You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "sam liu (JIRA)" <ji...@apache.org> on 2014/06/02 17:30:02 UTC
[jira] [Commented] (OOZIE-1740) Add a new function hadoop:conf()
that can be invoked from the workflow.xml and will return a hadoop
configuration option
[ https://issues.apache.org/jira/browse/OOZIE-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14015466#comment-14015466 ]
sam liu commented on OOZIE-1740:
--------------------------------
Hi Robert,
Sorry for responsing so late. According your comments, I tried 'Services.get().get(HadoopAccessorService.class).createJobConf(hostPort)' and it really works well to current EL function. Now my function looks like:
public static String hadoop_conf(String hadoopConfHostPort, String propName) {
Configuration conf = Services.get().get(HadoopAccessorService.class).createJobConf(hadoopConfHostPort);
String prop = conf.get(propName);
if(prop == null || prop.equals("")){
conf = new Configuration();
prop = conf.get(propName);
}
return conf.get(propName);
}
And in the workflow.xml, we should invoke the EL function like:
<property>
<name>mapreduce.map.java.opts</name>
<value>${hadoop:conf('jobtracker.host:9001', 'mapreduce.map.java.opts')} -Xss512k </value>
</property>
I did some tests and this could return expected results.
Now I am studying how to implement regarding coordinator EL functions. Will let you know if have any progress.
Please let me know if any comments/suggestions. Thanks a lot!
> Add a new function hadoop:conf() that can be invoked from the workflow.xml and will return a hadoop configuration option
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: OOZIE-1740
> URL: https://issues.apache.org/jira/browse/OOZIE-1740
> Project: Oozie
> Issue Type: Improvement
> Components: workflow
> Affects Versions: trunk, 3.3.2
> Reporter: sam liu
> Assignee: sam liu
> Attachments: OOZIE-1740.patch, OOZIE-1740.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)