Hadoop 2.2 & HBase 0.96 Maven 依赖总结
程序员文章站
2022-05-05 18:27:43
...
由于Hbase 0.94对Hadoop 2.x的支持不是非常好,故直接添加Hbase 0.94的jar依赖可能会导致问题。 但是直接添加Hbase0.96的依赖,由于官方并没有发布Hbase 0.96的jar包,通过maven编译项目的时候会出现找不到jar包导致编译失败。 通过网上的资料,得知Hbase 0.9
由于Hbase 0.94对Hadoop 2.x的支持不是非常好,故直接添加Hbase 0.94的jar依赖可能会导致问题。 但是直接添加Hbase0.96的依赖,由于官方并没有发布Hbase 0.96的jar包,通过maven编译项目的时候会出现找不到jar包导致编译失败。
通过网上的资料,得知Hbase 0.94后版本,直接添加Hbase-Client的依赖,通过查询得知需要以下依赖:
[html] view plaincopy
- dependency>
- groupId>commons-iogroupId>
- artifactId>commons-ioartifactId>
- version>1.3.2version>
- dependency>
- dependency>
- groupId>commons-logginggroupId>
- artifactId>commons-loggingartifactId>
- version>1.1.3version>
- dependency>
- dependency>
- groupId>log4jgroupId>
- artifactId>log4jartifactId>
- version>1.2.17version>
- dependency>
- dependency>
- groupId>org.apache.hbasegroupId>
- artifactId>hbase-clientartifactId>
- version>0.96.1-hadoop2version>
- dependency>
- dependency>
- groupId>com.google.protobufgroupId>
- artifactId>protobuf-javaartifactId>
- version>2.5.0version>
- dependency>
- dependency>
- groupId>io.nettygroupId>
- artifactId>nettyartifactId>
- version>3.6.6.Finalversion>
- dependency>
- dependency>
- groupId>org.apache.hbasegroupId>
- artifactId>hbase-commonartifactId>
- version>0.96.1-hadoop2version>
- dependency>
- dependency>
- groupId>org.apache.hbasegroupId>
- artifactId>hbase-protocolartifactId>
- version>0.96.1-hadoop2version>
- dependency>
- dependency>
- groupId>org.apache.zookeepergroupId>
- artifactId>zookeeperartifactId>
- version>3.4.5version>
- dependency>
- dependency>
- groupId>org.cloudera.htracegroupId>
- artifactId>htrace-coreartifactId>
- version>2.01version>
- dependency>
- dependency>
- groupId>org.codehaus.jacksongroupId>
- artifactId>jackson-mapper-aslartifactId>
- version>1.9.13version>
- dependency>
- dependency>
- groupId>org.codehaus.jacksongroupId>
- artifactId>jackson-core-aslartifactId>
- version>1.9.13version>
- dependency>
- dependency>
- groupId>org.codehaus.jacksongroupId>
- artifactId>jackson-jaxrsartifactId>
- version>1.9.13version>
- dependency>
- dependency>
- groupId>org.codehaus.jacksongroupId>
- artifactId>jackson-xcartifactId>
- version>1.9.13version>
- dependency>
- dependency>
- groupId>org.slf4jgroupId>
- artifactId>slf4j-apiartifactId>
- version>1.6.4version>
- dependency>
- dependency>
- groupId>org.slf4jgroupId>
- artifactId>slf4j-log4j12artifactId>
- version>1.6.4version>
- dependency>
若要使用org.apache.hadoop.hbase.mapreduce的API,需要加上:
最后,把Hadoop的依赖也贴上来,以防自己忘记: