[
https://issues.apache.org/jira/browse/OOZIE-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14553883#comment-14553883
]
Rohini Palaniswamy commented on OOZIE-2030:
-------------------------------------------
ActionStartXCommand again would not be the place to do it. Parsing of globals
is done in LiteWorkflowAppParser.handleGlobal and anything new should be
handled there. Earlier I had commented about make it aware of parent workflow
global section as well. Actually even that is not required and makes it
complicated. The simplest and cleanest fix with very less changes to code would
be to inject a global section into the sub workflow before submitting it. This
will then take the normal code path for global section.
SubWorkflowActionExecutor.java
{code}
if (eConf.getChild(("propagate-configuration"), ns) != null) {
XConfiguration.copy(parentConf, subWorkflowConf); // This
merges configuration section
// Add a method which injects or merges global section
here. If no existing global section, copy <global> element as is from parent.
If existing, merge the global section from parent workflow. The merging should
give preference to the sub-workflow <namenode>, <jobtracker> and
<configuration> in <global> and not override it. Only new configuration should
be added to existing <configuration>. Any <job-xml> in parent workflow <global>
should be added before the ones in sub-workflow when merging.
}
{code}
Basically if parent workflow had
{code}
<global>
<job-tracker>${job-tracker}</job-tracker>
<name-node>${namd-node}</name-node>
<job-xml>job1.xml</job-xml>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>dfs.umaskmode</name>
<value>077</value>
</property>
</configuration>
</global>
{code}
and sub-workflow had
{code}
<global>
<job-tracker>${job-tracker1}</job-tracker>
<job-xml>job2.xml</job-xml>
<configuration>
<property>
<name>dfs.umaskmode</name>
<value>022</value>
</property>
</configuration>
</global>
{code}
After merging sub-workflow should have
{code}
<global>
<job-tracker>${job-tracker1}</job-tracker>
<name-node>${namd-node}</name-node>
<job-xml>job1.xml</job-xml>
<job-xml>job2.xml</job-xml>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>dfs.umaskmode</name>
<value>022</value>
</property>
</configuration>
</global>
{code}
> Configuration properties from global section is not getting set in Hadoop job
> conf when using sub-workflow action in Oozie workflow.xml
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OOZIE-2030
> URL: https://issues.apache.org/jira/browse/OOZIE-2030
> Project: Oozie
> Issue Type: Bug
> Components: action
> Reporter: Peeyush Bishnoi
> Assignee: Jaydeep Vishwakarma
> Attachments: OOZIE-2030-v2.patch, OOZIE-2030.patch
>
>
> When submitting Oozie workflow with sub-workflow action and with global
> section, configuration properties defined in global section is not getting
> set in launched Hadoop job conf. But when we use Pig or MR action in
> workflow.xml, configuration properties from global section set properly into
> Hadoop job conf.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)