Home >Database >Mysql Tutorial >Hadoop 2.2 & HBase 0.96 Maven 依赖总结

Hadoop 2.2 & HBase 0.96 Maven 依赖总结

WBOY
WBOYOriginal
2016-06-07 15:12:431197browse

由于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 plaincopyHadoop 2.2 & HBase 0.96 Maven 依赖总结Hadoop 2.2 & HBase 0.96 Maven 依赖总结

  1.  dependency>  
  2.     groupId>commons-iogroupId>  
  3.     artifactId>commons-ioartifactId>  
  4.     version>1.3.2version>  
  5.  dependency>  
  6.  dependency>  
  7.     groupId>commons-logginggroupId>  
  8.     artifactId>commons-loggingartifactId>  
  9.     version>1.1.3version>  
  10. dependency>  
  11. dependency>  
  12.     groupId>log4jgroupId>  
  13.     artifactId>log4jartifactId>  
  14.     version>1.2.17version>  
  15. dependency>  
  16. dependency>  
  17.     groupId>org.apache.hbasegroupId>  
  18.     artifactId>hbase-clientartifactId>  
  19.     version>0.96.1-hadoop2version>  
  20. dependency>  
  21. dependency>  
  22.     groupId>com.google.protobufgroupId>  
  23.     artifactId>protobuf-javaartifactId>  
  24.     version>2.5.0version>  
  25. dependency>  
  26. dependency>  
  27.     groupId>io.nettygroupId>  
  28.     artifactId>nettyartifactId>  
  29.     version>3.6.6.Finalversion>  
  30. dependency>  
  31. dependency>  
  32.     groupId>org.apache.hbasegroupId>  
  33.     artifactId>hbase-commonartifactId>  
  34.     version>0.96.1-hadoop2version>  
  35. dependency>  
  36. dependency>  
  37.     groupId>org.apache.hbasegroupId>  
  38.     artifactId>hbase-protocolartifactId>  
  39.     version>0.96.1-hadoop2version>  
  40. dependency>  
  41. dependency>  
  42.     groupId>org.apache.zookeepergroupId>  
  43.     artifactId>zookeeperartifactId>  
  44.     version>3.4.5version>  
  45. dependency>  
  46. dependency>  
  47.     groupId>org.cloudera.htracegroupId>  
  48.     artifactId>htrace-coreartifactId>  
  49.     version>2.01version>  
  50. dependency>  
  51. dependency>  
  52.     groupId>org.codehaus.jacksongroupId>  
  53.     artifactId>jackson-mapper-aslartifactId>  
  54.     version>1.9.13version>  
  55. dependency>  
  56. dependency>  
  57.     groupId>org.codehaus.jacksongroupId>  
  58.     artifactId>jackson-core-aslartifactId>  
  59.     version>1.9.13version>  
  60. dependency>  
  61. dependency>  
  62.     groupId>org.codehaus.jacksongroupId>  
  63.     artifactId>jackson-jaxrsartifactId>  
  64.     version>1.9.13version>  
  65. dependency>  
  66. dependency>  
  67.     groupId>org.codehaus.jacksongroupId>  
  68.     artifactId>jackson-xcartifactId>  
  69.     version>1.9.13version>  
  70. dependency>  
  71. dependency>  
  72.     groupId>org.slf4jgroupId>  
  73.     artifactId>slf4j-apiartifactId>  
  74.     version>1.6.4version>  
  75. dependency>  
  76. dependency>  
  77.     groupId>org.slf4jgroupId>  
  78.     artifactId>slf4j-log4j12artifactId>  
  79.     version>1.6.4version>  
  80. dependency>  

    若要使用org.apache.hadoop.hbase.mapreduce的API,需要加上:

               

                        org.apache.hbase

                       hbase-server

                       0.96.1-hadoop2

              


     最后,把Hadoop的依赖也贴上来,以防自己忘记:

          
       
            org.apache.hadoop
            hadoop-client
            2.3.0
       

       
            commons-configuration
            commons-configuration
            1.6
       

       
            org.apache.hadoop
            hadoop-auth
            2.3.0
       

       
            org.apache.hadoop
            hadoop-common
            2.3.0
       
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn