Alejandro,
Thanks. So are the configuration properties passed to the Java class in the
workflow supposed to be in an xml file specified by 'oozie.action.conf.xml '?
And that xml file will exist on the HDFS when the Java class runs?
If so, in my Java class did:
String oozieProps = System.getProperty("oozie.action.conf.xml");
It did return a path to an XML, but when it tried to open/read the file, it got
an IO exception that it did not exist.
Steve
________________________________
From: Alejandro Abdelnur [mailto:[email protected]]
Sent: Thu 6/21/2012 9:41 AM
To: [email protected]
Subject: Re: question on how Java class from workflow action reads properties
Hi Steve,
>From Mona's Java Cookbook doc which is not live yet:
-----
Within your Java Main class, you can query for the following system
properties pertaining to your Oozie job.
* oozie.job.id : Workflow ID
* oozie.action.id : Action ID
* oozie.action.conf.xml : local path to the resolved action
configuration
* oozie.action.output.properties : Action properties output as a
Java Properties file
-----
HTH
Thx
Alejandro
On Thu, Jun 21, 2012 at 9:19 AM, <[email protected]> wrote:
> If I have a workflow Java action similar as follows, setting configuration
> properties:
> <action name='some_task'>
> <java>
> <job-tracker>${jobTracker}</job-tracker>
> <name-node>${nameNode}</name-node>
> <configuration>
> <property>
> <name>mapred.job.queue.name</name>
> <value>${queueName}</value>
> </property>
> <property>
> <name>user</name>
> <value>${user}</value>
> </property>
> <property>
> <name>oozieServer</name>
> <value>${oozieServer}</value>
> </property>
> <property>
> <name>configLocation</name>
> <value>${configLocation}</value>
>
>
> In the Java class specified in the action, how do I read those
> configuration properties? I found they don't get passed as system/command
> line properties.
>
> Thanks.
>
>
>
>
> Steve
> Sogeti USA
> 3636 N. Central Ave.
> #810
> Phoenix, AZ 85012
> www.us.sogeti.com <http://www.us.sogeti.com/>
>
>
--
Alejandro