我曾经使用(使用GenericOptionsParser)运行hadoop mapreduce
hadoop jar app.jar app -files /home/some/file#file
然而,在hadoop的最新版本中,我得到了
Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
那么如何使用ToolRunner实现在所有mapreduce节点之间共享的-files选项呢?
发布于 2014-12-12 05:23:37
显然之前的版本已经被弃用了……
这就是我所做的。
import org.apache.hadoop.conf.Configuration; . . . Configuration conf = new Configuration(); . Job job = Job.getInstance(conf, "appname"); job.setJarByClass(appname.class); . . job.addCacheFile(new URI("/file/in/hdfs/APP/appfile#appfile")); . .
https://stackoverflow.com/questions/27383819
复制相似问题