From the command line, parameters can be passed to ToolRunner as follows:
hadoop jar myJar.jar com.Main -Dprop1=prop1value -Dprop2=prop2value
I want to invoke my MapReduce job as part of a MapReduce action from Oozie.
I tried defining properties in the workflow as follows:
<property>
<name>param1</name>
<value>Hello World</value>
</property>
EDIT This is how I'm trying to read the parameters from my MapReduce job:
Job job = new Job();
Configuration conf = job.getConfiguration();
System.out.println(conf.get("param1"));
But I'm unable to read it from the mapreduce program.
Although My question says passing parameters to ToolRunner, I don't think this is specific to toolrunner. It is general to a MapReduce job invoked using an Oozie MapReduce action. Any help will be appreciated!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments