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

Daniel del Castillo commented on FALCON-1573:
---------------------------------------------

No problem [~pallavi.rao], I hope I can make contributions to this cool project 
more often.

My idea behind this change is to keep the entity XML as the blueprint but give 
users some flexibility to define properties that will be set on schedule time. 
In this sense, any property hard-set in the XML should have preference over 
user-supplied properties. This is particularly true for values like the entity 
name and other properties provided by Falcon like the cluster where the process 
runs, etc. Therefore users should not be allowed to override these values.

An alternative could be define a namespace for user-supplied properties, e.g. 
every property passed in the schedule service is prefixed in the builder but, 
from my point of view, the former scenario looked simpler from users' 
perspective.

Any suggestions are most welcome.

I'm going to upload the RB patch as requested.

Thanks.

> Supply user-defined properties to Oozie workflows during schedule
> -----------------------------------------------------------------
>
>                 Key: FALCON-1573
>                 URL: https://issues.apache.org/jira/browse/FALCON-1573
>             Project: Falcon
>          Issue Type: New Feature
>          Components: oozie
>    Affects Versions: trunk
>            Reporter: Daniel del Castillo
>            Priority: Minor
>         Attachments: FALCON-1573-v1.patch
>
>
> The work in FALCON-1434 added the ability to specify properties for the 
> purpose of enabling scheduler selection. However, this could be more 
> generally useful as a means for users to submit custom properties that will 
> be visible in Oozie workflows.
> This will enable users to reference properties in the entity XML itself and 
> passing these properties down to workflows. For example, a process scheduled 
> with the command:
> {code}
> bin/falcon entity -schedule -type process -name helloFalconProcess 
> -properties custom.property:HEY
> {code}
> can reference the property _custom.property_ in the process XML as
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <process name="helloFalconProcess" xmlns="uri:falcon:process:0.1">
>   ...
>   <properties>
>     ...
>     <property name="customProperty" value="${coord:conf('custom.property')}"/>
>     ...
>   </properties>
>   ...
> </process>
> {code}
> An Oozie workflow can then easily make use of such property:
> {code:xml}
> <workflow-app xmlns="uri:oozie:workflow:0.4" name="hello-falcon-wf">
>   ...
>     <java>
>       ...
>       <arg>--customValue=${customProperty}</arg>
>       ...
>     </java>
>     ...
> </workflow-app>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to