Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 60D9471B0 for ; Fri, 16 Dec 2011 01:34:00 +0000 (UTC) Received: (qmail 19987 invoked by uid 500); 16 Dec 2011 01:33:59 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 19947 invoked by uid 500); 16 Dec 2011 01:33:59 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 19938 invoked by uid 500); 16 Dec 2011 01:33:59 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 19935 invoked by uid 99); 16 Dec 2011 01:33:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2011 01:33:59 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2011 01:33:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 93CD7115304 for ; Fri, 16 Dec 2011 01:33:30 +0000 (UTC) Date: Fri, 16 Dec 2011 01:33:30 +0000 (UTC) From: "xuting zhao (Commented) (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <2042382839.17902.1323999210606.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <945943382.10570.1323862891969.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (PIG-2429) Better error message in pig_*.log MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170667#comment-13170667 ] xuting zhao commented on PIG-2429: ---------------------------------- Hi Anitha, I am trying to reproduce the bug and I ran that example in both branch-0.8, release-0.9 and trunk in local mode for 15 times and it gave the correct error message. May I know how often do you get the wrong message? Is there some specific condition for this bug? Thanks! Xuting The command line I used: bin/pig -x local test.pig test.pig: register 'a.py' using org.apache.pig.scripting.jython.JythonScriptEngine as test; A = load 'input.txt' as (x:chararray); B = foreach A generate test.a(x) as y; C = group B by (y); store C into 'C'; a.py: #!/usr/bin/python @outputSchema("n:chararray") def a(n): return n.lower(); input.txt: a > Better error message in pig_*.log > --------------------------------- > > Key: PIG-2429 > URL: https://issues.apache.org/jira/browse/PIG-2429 > Project: Pig > Issue Type: Bug > Affects Versions: 0.9.0 > Reporter: Anitha Raju > Assignee: xuting zhao > Priority: Minor > > Hi, > The below script sometimes fails giving null error message and some times with correct error message in the pig_*.log > Script > {code} > register 'a.py' using jython as test; > A = load 'test.txt' as (x:chararray); > B = foreach A generate > test.a(x) as y; > C = group B by (y); > store C into 'C'; > {code} > where a.py is > {code} > @outputSchema("n:chararray") > def a(n): > n = n.lower(); > return n; > {code} > input- test.txt > ======= > a > ======= > I have not put null check in a.py so that the script would error out. > This script when run with 0.9 version, fails printing in the pig_*.log either null error message or the correct error message > Null Error message > {code} > Pig Stack Trace > --------------- > ERROR 2244: Job failed, hadoop does not return any error message > org.apache.pig.backend.executionengine.ExecException: ERROR 2244: Job failed, hadoop does not return any error message > at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:139) > at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:192) > at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:164) > at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:81) > at org.apache.pig.Main.run(Main.java:561) > at org.apache.pig.Main.main(Main.java:111) > {code} > Correct Error message > {code} > Backend error message > --------------------- > org.apache.pig.backend.executionengine.ExecException: ERROR 0: Error executing function > at org.apache.pig.scripting.jython.JythonFunction.exec(JythonFunction.java:106) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:216) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:305) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:322) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:332) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:284) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290) > at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLocalRearrange.getNext(POLocalRearrange.java:256) > at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:267) > at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:262) > at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:64) > at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) > at org.apache.hadoop.mapred.Child$4.run(Child.java:261) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:396) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059) > at org.apache.hadoop.mapred.Child.main(Child.java:255) > Caused by: Traceback (most recent call last): > File "a.py", line 5, in n > AttributeError: 'NoneType' object has no attribute 'lower' > at org.python.core.PyException.fillInStackTrace(PyException.java:70) > at java.lang.Throwable.(Throwable.java:181) > at java.lang.Exception.(Exception.java:29) > at java.lang.RuntimeException.(RuntimeException.java:32) > at org.python.core.PyException.(PyException.java:46) > at org.python.core.PyException.(PyException.java:43) > at org.python.core.PyException.(PyException.java:61) > at org.python.core.Py.AttributeError(Py.java:145) > at org.python.core.PyObject.noAttributeError(PyObject.java:936) > at org.python.core.PyObject.__getattr__(PyObject.java:931) > at org.python.pycode._pyx3.n$1(a.py:6) > at org.python.pycode._pyx3.call_function(a.py) > at org.python.core.PyTableCode.call(PyTableCode.java:165) > at org.python.core.PyBaseCode.call(PyBaseCode.java:297) > at org.python.core.PyFunction.__call__(PyFunction.java:370) > at org.python.core.PyFunction.__call__(PyFunction.java:360) > at org.python.core.PyFunction.__call__(PyFunction.java:355) > at org.apache.pig.scripting.jython.JythonFunction.exec(JythonFunction.java:103) > ... 18 more > > {code} > Putting a couple of sysout in the code, i found it was happening when in Launcher.getStats > {code} > TaskReport[] mapRep = jobClient.getMapTaskReports(MRJobID); > getErrorMessages(mapRep, "map", errNotDbg, pigContext); > totalHadoopTimeSpent += computeTimeSpent(mapRep); > {code} > whenever mapRed becomes null, it gives null error message. > Can it be made better? > Regards, > Anitha -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira