[ 
https://issues.apache.org/jira/browse/OOZIE-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sam liu updated OOZIE-1740:
---------------------------

    Attachment: OOZIE-1740.patch

This patch is for trunk.

The usage of hadoop_conf EL function in workflow.xml is:
    <property>
      <name>mapreduce.map.java.opts</name>
      <value>${hadoop:conf("/opt/hadoop/conf","mapreduce.map.java.opts")} 
-Xss512k </value>
    </property>

The function hadoop:conf has two parameters:
- String hadoopConfPath: The path of a specific folder which includes hadoop 
configuration files("core-site.xml", "hdfs-site.xml", "mapred-site.xml", 
"yarn-site.xml","hadoop-site.xml"). If hadoopConfPath is not null or unequal to 
"", Hadoop Conf EL Function will load the predefined configuration files under 
hadoopConfPath into hadoop configuration object, and then return the value of 
the target property. If hadoopConfPath is null or equal to "", Hadoop Conf EL 
Function will generate a default hadoop configuration object directly, and then 
return the value of target property.
- String propName: the name of target property.

This feature enables Oozie runtime context to get the hadoop option. Actually, 
we do need such feature under some situations. With this feature, Oozie runtime 
could overwrite the value of hadoop property, and the new value could base on 
the value of original hadoop property. Just like above usage, the new value is 
to add parameter ' -Xss512k ' to the end of original value of option 
'mapreduce.map.java.opts'. However, without this feature, under the same 
situation, Oozie could not get the original value of option 
'mapreduce.map.java.opts'.

Could Oozie expert please help take a review on this patch?

Thanks in advance!

> 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: 3.3.2
>            Reporter: sam liu
>         Attachments: OOZIE-1740.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to