[ 
https://issues.apache.org/jira/browse/OOZIE-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582309#comment-14582309
 ] 

Srikanth Sundarrajan commented on OOZIE-2030:
---------------------------------------------

[~jaydeepvishwakarma], Context arg in Subworkflow should give you a handle to 
the parent workflow via {{context::getWorkflow()}}. Shouldn't you be accessing 
the global section of the parent workflow here instead of 
{{LiteWorkflowAppParser::parse()}}. Mutating a single property 
via {{jobConf.get(SubWorkflowActionExecutor.SUBWF_JOBCONF)}} isn't likely to 
work when subflow depth is more than one, as the same will be overwritten. 
{code}
                XConfiguration subWorkflowConf = new XConfiguration();
                Configuration parentConf = new XConfiguration(new 
StringReader(context.getWorkflow().getConf()));
                if (eConf.getChild(("propagate-configuration"), ns) != null) {
                    XConfiguration.copy(parentConf, subWorkflowConf);
                }
{code}

Also the test case isn't really testing for precedence of global overlays. The 
current test has mutually exclusive conf in the parent & subflow global section 
and with this test case it is not possible to assert that the precedence is 
being honored correctly.

> 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-v3.patch, 
> OOZIE-2030-v4.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)

Reply via email to