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

Robert Kanter commented on OOZIE-942:
-------------------------------------

- For workflows, the xml string is already parsed to an Element, so I think it 
makes sense to use that Element object directly.  
- For coordinators, I can use the coordJob.getAppNamespace() you mentioned.  
However, the two lines before the call to verifyParameters calls 
readAppNamespace(), which actually calls XmlUtils.parseXml() anyway (and then 
figures out the namespace before "throwing away" the Element object); so, I 
think it makes more sense to call XmlUtils.parseXml() before readAppNamespace() 
and modify readAppNamespace to take an Element instead of the xml string.  
- For bundles, there isn't a cheap way to get the namespace.  I could make a 
version of removeComments() that returns an Element instead of a String, but 
the rest of the code in BundleSubmitXCommand keeps the xml as a String, so we'd 
have to convert it back from an Element if I changed that.  So, I don't think 
we'd really gain anything by this.  Plus, it would be nice to keep things 
simpler by having one method to call to verifyParameters instead of different 
ones to handle other argument types.  

Long story short, I can easily make workflows and coordinators use the Element 
object directly cheaply; I can't for bundles, but there doesn't seem to be a 
better way.  

Do you agree?  

Also, the call to removeComments() has a bug: the returned value isn't used 
(but this should be a separate JIRA)
                
> Add formal Parameters to bundle XML
> -----------------------------------
>
>                 Key: OOZIE-942
>                 URL: https://issues.apache.org/jira/browse/OOZIE-942
>             Project: Oozie
>          Issue Type: Improvement
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: OOZIE-942.patch
>
>
> Just like OOZIE-239 but add formal parameters to Bundle jobs too.  
> There's also a minor bug in OOZIE-239 that will prevent Oozie from printing a 
> warning when a user submits a coordinator job using schema >= 0.4 without a 
> <parameters> section.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to