Jean,
I don't that there is a way to navigate to a clean up block from an explicit 
kill, but there is always use of the <prepare> at the beginning of the action, 
and clean up what might have been left from a previous run.
There is only the <ok to ...> and <error to ...> navigation from an action.
 
Steve Charles
 
Sogeti USA
3636 N. Central Ave.
#810
Phoenix, AZ 85012
www.us.sogeti.com <http://www.us.sogeti.com/>  
 

________________________________

From: Jean T. Anderson [mailto:[email protected]]
Sent: Thu 7/5/2012 2:30 PM
To: [email protected]
Subject: How to catch kill control-flow node in Java?



Hi, all,

I'm new to oozie, and am developing code for java actions. I'm looking
for a good way to catch a killed job so I can clean it up. So far, I'm
able to cleanup great if the java source returns success or throws an
exception:

    <ok to="cleanup"/>
    <error to="cleanup"/>

That cleanup action fires my Java class that cleans things up.

But I can't catch if it was killed:

    <kill to="cleanup"/>

That fails schema validation:

       E0701: XML schema error, cvc-complex-type.2.4.d: Invalid content
was found
       starting with element 'kill'. No child element is expected at
this point.

And Section 3.1.3 of the Oozie functional spec clearly says "A kill node
does not have transition elements because it ends the workflow job, as
KILLED ."

Is there a good way to catch the kill?  I did a google search, but
didn't spot anything obvious.

thanks for any pointers,

  -jean




Reply via email to