我正在尝试通过Wildfly 10.00访问M7,但无法连接。有人可以帮我吗?
代码:
val config = HBaseConfiguration.create()
config.set("mapr.hbase.default.db", "maprdb")
config.set("dfs.nameservices", "XXXX")
config.set("dfs.ha.namenodes." + "XXXX", "XYZ1.net,XYZ2.net")
config.set("dfs.namenode.rpc-address." + "XXXX" + ".cldb1", "XYZ1.net" + ":7222")
config.set("dfs.namenode.rpc-address." + "XXXX" + ".cldb2", "XYZ2.net" + ":7222")
val connection = ConnectionFactory.createConnection(config)
val table = connection.getTable(TableName.valueOf(tableName))
val CPDBget = new Get(Bytes.toBytes(rowKey))
POM文件:
<groupId>com.aexp.prospect</groupId>
<artifactId>SpringBootRead</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SpringBootRead</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<repositories>
<repository>
<id>mapr-releases</id>
<url>http://repository.mapr.com/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<properties>
<start-class>com.XXX.ReadMidApplication</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<!--<version>1.1.8-mapr-1703</version>-->
<!--<version>1.1.1-mapr-1602-m7-5.1.0</version>-->
<version>1.1.8-mapr-1703-m7-5.2.1</version>
<!--<version>0.98.12-mapr-1506-m7-5.0.0</version>-->
<exclusions>
<exclusion>
<artifactId>netty-all</artifactId>
<groupId>io.netty</groupId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<!--https://mvnrepository.com/artifact/org.apache.hbase/hbase-->
<!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase -->
<!--
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<!–<version>0.98.12-mapr-1506</version>–>
<!–<version>1.1.8</version>–>
<version>0.98.12</version>
<type>pom</type>
</dependency>
-->
<!-- <dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>1.1.8-mapr-1703</version>
<scope>provided</scope>
</dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.0-mapr-1703</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>2.7.0-mapr-1703</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
<version>2.7.0-mapr-1703</version>
</dependency>
<dependency>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs-core</artifactId>
<version>5.0.0-mapr</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mapr.hadoop</groupId>
<artifactId>hadoop2</artifactId>
<version>5.0.0-mapr</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs</artifactId>
<version>5.0.0-mapr</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs-jni</artifactId>
<version>5.0.0-mapr</version>
<scope>provided</scope>
</dependency>-->
<!-- <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>11.0.2</version>
</dependency>-->
<!--https://mvnrepository.com/artifact/net.liftweb/lift-json-->
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.11</artifactId>
<version>2.6.3</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.typesafe.play</groupId>-->
<!--<artifactId>play-json_2.13.0-M4</artifactId>-->
<!--<version>2.7.0-M1</version>-->
<!--</dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-assembly-plugin -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>SpringBootRead</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
错误代码:
Exception“:” java.lang.RuntimeException:实例化com.mapr.fs.hbase.MapRClusterConnectionImpl。\ n ==> com.mapr.fs.hbase.MapRClusterConnectionImpl从[Module \“ deployment.SpringBootRead。 war:main \“(来自服务模块加载程序)。”}]