【问题标题】:Distributed files using GenericOptionsParser and ToolRunner使用 GenericOptionsParser 和 ToolRunner 的分布式文件
【发布时间】:2015-02-07 15:11:25
【问题描述】:

我曾经使用 (This uses 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 实现 -files 选项在所有 mapreduce 节点之间共享?

【问题讨论】:

    标签: hadoop distributed-caching toolrunner


    【解决方案1】:

    显然以前的已被弃用...

    这就是我所做的......

    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")); . .

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-18
      • 1970-01-01
      • 2020-04-19
      • 1970-01-01
      • 2017-12-06
      • 2013-12-04
      • 2020-01-01
      • 1970-01-01
      相关资源
      最近更新 更多