incubator-oozie-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Islam <misla...@yahoo.com>
Subject Re: Is it possible to get all PIG error codes in Oozie?
Date Thu, 13 Oct 2011 02:06:18 GMT
Adding to Virag's comment..
Currently there is no way of getting the pig level error code available in WF level.

I think it is a valid ask to consider in future release.

Would please volunteer to create a JIRA at :https://issues.apache.org/jira/browse/OOZIE ?

Regards,
Mohammad




________________________________
From: Virag Kothari <virag@yahoo-inc.com>
To: "oozie-users@incubator.apache.org" <oozie-users@incubator.apache.org>
Sent: Wednesday, October 12, 2011 12:18 PM
Subject: Re: Is it possible to get all PIG error codes in Oozie?

You can look at how a pig job is submitted and how PigRunner api is used in
this file
https://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/or
g/apache/oozie/action/hadoop/PigMain.java

Javadoc for PigRunner:
http://pig.apache.org/docs/r0.8.1/api/org/apache/pig/PigRunner.html

Regards,
Virag



On 10/12/11 10:28 AM, "Virag Kothari" <virag@yahoo-inc.com> wrote:

> 
> Hi Marek,
> 
> Oozie uses the PigRunner API to submit pig job for pig versions 0.8 and
> above. Currently, when a pig job ends, Oozie uses return code 2 for failure
> and 0 for success. (More on Return Codes:
> http://pig.apache.org/docs/r0.9.1/api/org/apache/pig/PigRunner.ReturnCode.ht
> ml, http://ofps.oreilly.com/titles/9781449302641/running_pig.html)
> So, I don't think you can get all error codes of Pig through a pig job.
> 
> Alternatively, you can try using PigRunner API in Java code as Oozie
> supports java action. There you can have your own logic of returning the
> error codes thrown by Pig.
> 
> Thanks,
> Virag
> 
> On 10/12/11 1:30 AM, "Marek Miglinski" <mmiglinski@seven.com> wrote:
> 
>> Hey guys,
>> 
>> I've encountered with interesting situation when I run a Pig job through
>> Oozie. When Pig doesn't get any input data it throws "Message:
>> org.apache.pig.backend.executionengine.ExecException: ERROR 2118: No input
>> paths specified in job", after that Oozie goes right to <kill> tag in XML.
>> Now, how do I get PIG's ERROR code? Because I see that Oozie only has got
>> functions:
>> ${wf:errorMessage(wf:lastErrorNode())} which outputs:
>> Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
>> ${wf:errorCode('Calculations')} which outputs:
>> 2
>> ${wf:lastErrorNode()} which outputs:
>> Calculations
>> 
>> Error exit code [2] is thrown by "ERROR
>> org.apache.pig.tools.grunt.GruntParser
>> - ERROR 2244: Job failed, hadoop does not return any error message
>> Intercepting System.exit(2)" Which is thrown in any situation, but I need a
>> specific case, when PIG doesn't got any data to parse, so I could handle that
>> by another Job... Is there a way?
> 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message