Hey,

How about adding a functionality to the Pig action to return the PigStats JSON 
using the <capture-output/> functionality?
The pig action could return that on an attribute (say: pig_stats) that can be 
accessed in the workflow as as ${wf:actionData('pig-node')['pig_stats']}.
If something like this is implemented I will have exactly what I need because 
I'll have another action on my workflow that will use that as a <param/>.

Let me know if this is possible or how do you recommend I could get the 
PigStats to my action.

Here's an example of what I'm talking about:

--------------------------------------------
<workflow-app xmlns="uri:oozie:workflow:0.1" name="session_counts-wf">
    <start to="pig-node"/>
    <action name="pig-node">
        <pig>
            <job-tracker>${JOB_TRACKER}</job-tracker>
            <name-node>${NAME_NODE}</name-node>
            <script>${SCRIPT}</script>
            <capture-output />
        </pig>
        <ok to="stats-node"/>
        <error to="fail"/>
    </action>
    <action name='stats-node'>
        <java>
            <job-tracker>${JOB_TRACKER}</job-tracker>
            <name-node>${NAME_NODE}</name-node>
            <main-class>com.turner.util.CheckPigStats</main-class>
            <arg>${wf:actionData('pig-node')['pig_stats']}</arg>
        </java>
        <ok to="end" />
        <error to="fail" />
    </action>
    <kill name="fail">
        <message>Pig failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>
----------------------------------------------

Thanks for your help.
Eduardo.

Reply via email to