将参数传递给Hadoop中的映射函数 [英] Passing parameters to map function in Hadoop

查看:122
本文介绍了将参数传递给Hadoop中的映射函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Hadoop的新手。我想从mapper类的map函数内的主函数(Java程序)访问命令行参数。请建议如何做到这一点。

I am new to Hadoop. I want to access a command line argument from main function(Java program) inside the map function of the mapper class. Please suggest ways to do this.

推荐答案

Hadoop 0.20 ,引入了新的MR API,新的(oahmapreduce软件包)和旧的MR API(oahmapred),除了可以使用新的API在映射器和简化器中提取数据。什么是阿农提到的是旧的API。

Hadoop 0.20, introduced new MR API, there is not much functionality difference between the new (o.a.h.mapreduce package) and old MR API (o.a.h.mapred) except that data can be pulled within the mappers and the reducers using the new API. What Arnon is mentioned is with the old API.

检查此文章,用于使用新旧API传递参数。

Check this article for passing the parameters using the new and old API.

这篇关于将参数传递给Hadoop中的映射函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆