0

I used to run hadoop mapreduce using (This uses GenericOptionsParser)

hadoop jar app.jar app -files /home/some/file#file

However in the recent version of hadoop I am getting

Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.

So how to implement -files option to share among all mapreduce nodes using ToolRunner?

Joel
  • 1,650
  • 2
  • 22
  • 34

1 Answers1

0

Apparently previous ones have been deprecated...

this is what I did...

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

Joel
  • 1,650
  • 2
  • 22
  • 34