hadoop - How to make file optional in Oozie workflow? -
suppose have workflow action need , use file hdfs if exists not fail otherwise. there way in workflow configuration?
so, if have this:
<action name="run"> <java> <main-class>ajavaprogram</main-class> ... <arg>-files</arg> <arg>properties.json</arg> ... <file>${concat(additionspath, "properties.json")}</file> ... </java> </action>
it works fine long properties file exists in hdfs in right place, if doesn't, workflow fails. there way not fail if file isn't present copied hdfs? way make file optional workflow.xml?
every action has 2 options
<ok to="myshelljob"/> <error to="myshelljob"/>
in error section mentioned next shell action name , instead of failing. continue next shell action. in shell action can check file exists or not. if file not exists, continue next action , if other error occurred action fail.
Comments
Post a Comment