【问题标题】:Which libraries are needed for mapreduce on HBase?HBase 上的 mapreduce 需要哪些库?
【发布时间】:2014-07-21 13:36:00
【问题描述】:

我有一个非常基本的问题! HBase 上的 MapReduce 需要哪些库? 我知道我必须使用 TableMapper,并且我从 maven 获得了 hadoop-client 2.2.0 和 hbase-client 0.98.2,但是 API 中没有 TableMapper。 谢谢。

【问题讨论】:

  • 你能分享一下导入 TableMapper 所需的最小依赖吗?

标签: maven mapreduce hbase hadoop2


【解决方案1】:

除了hbase-client 依赖之外,您还需要相同版本的hbase-server 依赖,这还将包括您需要的mapreduce 库。 如果您使用的是 Maven,则需要在您的 pom.xml 文件中添加:

<dependency>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-server</artifactId>
    <version>1.1.2</version>
</dependency>

(在写最后一个版本的时候是1.1.2) 祝你好运!

【讨论】:

  • 谢谢回复,只获取hbase-hadoop2-compat不是更好吗?
  • 仅仅声明对 hbase-hadoop2-compat 的依赖是不够的 - 该包只是在 hbase 和 hadoop 之间保持特定的粘合 - 与 map reduce 无关。对于 MapReduce,您需要 hbase-server 依赖项 - 这是 TableMapper 和 TableMapReduceUtil 所在的位置。
  • 是下面这个吗? groupId:org.apache.hbase artifactId:hbase-server version:0.99.2(简化的maven)
【解决方案2】:

hbase 2.0之前,需要在pom.xml中添加follow依赖

<dependency>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-server</artifactId>
<version>1.3.1</version>

hbase 2.0之后,

<dependency>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-mapreduce</artifactId>
<version>2.0.0</version>

【讨论】:

    猜你喜欢
    • 2015-05-22
    • 1970-01-01
    • 1970-01-01
    • 2018-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-26
    相关资源
    最近更新 更多