Dear Wiki user, You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The following page has been changed by SanthoshSrinivasan: http://wiki.apache.org/pig/PigErrorHandling ------------------------------------------------------------------------------ Provide users with readable error messages. Stack traces provide a good mechanism to help debugging but do not mean much to the user. Readable and simple error messages will be presented on STDERR. Error codes will be devised for all error messages. Detailed information like stack trace will be logged into client side logs. The logs will be stored in the current working directory or the user's home directory. Users can send logs that contain the details of the error like stack trace to assist developers in resolving issues. + E.g.: For a semantic error like mismatch in cogroup arity, the STDERR messages and the log messages will look like. Note that this example is used to illustrate a possible use case. + + {{{#!java + //STDERR + grunt> a = load 'input1' as (x, y, z); + grunt> b = load 'input2' as (m, n, o); + grunt> c = cogroup a by (x, y), b by m; + 2008-10-22 13:54:28,821 [main] ERROR org.apache.pig.tools.grunt.GruntParser - The arity of the group by columns do not match. + + //LOG + 2008-10-22 13:54:28,821 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: The arity of the group by columns do not match. + at org.apache.pig.PigServer.parseQuery(PigServer.java:298) + at org.apache.pig.PigServer.registerQuery(PigServer.java:263) + at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:439) + at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:249) + at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:94) + at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58) + at org.apache.pig.Main.main(Main.java:282) + Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: The arity of the group by columns do not match. + at org.apache.pig.impl.logicalLayer.parser.QueryParser.parseCogroup(QueryParser.java:169) + at org.apache.pig.impl.logicalLayer.parser.QueryParser.CogroupClause(QueryParser.java:1739) + at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:941) + at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:755) + at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:550) + at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60) + at org.apache.pig.PigServer.parseQuery(PigServer.java:295) + ... 6 more + + 2008-10-22 13:54:28,821 [main] ERROR org.apache.pig.tools.grunt.GruntParser - The arity of the group by columns do not match. + 2008-10-22 13:54:28,821 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: The arity of the group by columns do not match. + }}} + '''Note:''' 1. Users are responsible for purging error logs