Hadoop:实现 oahmapred 的接口,还是从 oahmapreduce 扩展类?

发布于 2024-12-14 06:09:58 字数 662 浏览 4 评论 0原文

我正在学习 Hadoop (0.20.205),我有点困惑。推荐哪种方式:

A) 从 org.apache.hadoop.mapred 实现 Mapper 和Reducer 接口,并使用 配置作业JobConf,如 PiEstimator 示例中所示。

B) 从org.apache.hadoop.mapreduce扩展MapperReducer类,并使用Job配置作业,如 WordCount 示例中所示。

哪一种在未来更有可能被淘汰?

Hbase (0.90.4) 似乎更喜欢第二种方式,因为 oahhmapred 中的 TableOutputFormat 已被弃用,并且 oahhmapreduce 中的 TableOutFormat代码> 不是。另一方面,像 IdentityMapperIdentityReducer 这样有用的类似乎只存在于 oahmapred 中。总的来说,我倾向于版本 B。

您会选择哪种方式,为什么?提前致谢。

I'm learning Hadoop (0.20.205) and I'm a little bit confused. Which way is recommended:

A) Implement Mapper and Reducer interfaces from org.apache.hadoop.mapred, and configure the job using JobConf, as in the PiEstimator example.

B) Extend Mapper and Reducer classes from org.apache.hadoop.mapreduce, and configure the job using Job, as in the WordCount example.

Which one is more likely to become obsolete in the future?

Hbase (0.90.4) seems to prefer the second way, since TableOutputFormat in o.a.h.h.mapred is deprecated, and TableOutFormat in o.a.h.h.mapreduce is not. On the other hand, useful classes like IdentityMapper or IdentityReducer seem to exist only in o.a.h.mapred. Overall, I'm leaning towards version B.

Which way would you choose, and why? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柏林苍穹下 2024-12-21 06:09:58

oahmapred 是旧的 MR API,oahmapreduce 是新的 API。功能方面没有太大区别,但新的 API 更易于维护。请此处查看我在 StackOverflow 中的回复。

o.a.h.mapred is the old MR API and the o.a.h.mapreduce is the new API. There is not much difference functionality wise, but the new API is easier to maintain. Please see my response in StackOverflow here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文