Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 07-27-2015 02:58 AM - edited 09-16-2022 02:35 AM
Hi,
I am running my oozie workflow through command prompt.
I assigning value to a parameter "var" in my my workflow.
<property>
<name>var</name>
<value>2</value>
</property>
Now how can i access the variable value in my java Mapper Program.
Will the below metioned work for me:
protected void setup(Context context) throws IOException,InterruptedException {
Configuration conf = context.getConfiguration();
var_val = conf.get("var");
}
Created 07-27-2015 03:03 AM
Created 07-27-2015 03:03 AM
Created 07-28-2015 06:43 AM
Hi Harsh,
The information provided for Java Action is clear to me. But I have doubt regarding MapReduce action.
I am using only Mapreduce action for my workflow and I am placing only my Mapper class & Reducer Class in the .jar file. I want to pass all the properties and parameters through Oozie workflow.
Now can I get the value of the "var" variable, i.e. "2", in my Mapper using the below code in my mapper class.
protected void setup(Context context) throws IOException,InterruptedException {
Configuration conf = context.getConfiguration();
var_val = conf.get("var");
}
Created 07-28-2015 07:06 AM