You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2011/09/02 02:14:09 UTC
[jira] [Created] (PIG-2263) Different error messages in grunt mode
and file mode
Different error messages in grunt mode and file mode
----------------------------------------------------
Key: PIG-2263
URL: https://issues.apache.org/jira/browse/PIG-2263
Project: Pig
Issue Type: Bug
Components: parser
Affects Versions: 0.9.0
Reporter: Ashutosh Chauhan
Since in grunt parsing happens statement by statement and in file, whole of the script is considered, its possible to have different error messages. Problem here is that in file mode, most important error message is gobbled up and is not printed either on stdout/stderr or in logfile. In 0.8 it was correctly getting printed at stderr.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2263) Different error messages in grunt
mode and file mode
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096219#comment-13096219 ]
Daniel Dai commented on PIG-2263:
---------------------------------
The root cause of this issue is the exception chain is broken due to RecognitionException. RecognitionException(antlr class) does not propagate its cause. We only print the message of its cause but no further detail. We can fix it by put more details in the message.
> Different error messages in grunt mode and file mode
> ----------------------------------------------------
>
> Key: PIG-2263
> URL: https://issues.apache.org/jira/browse/PIG-2263
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.9.0
> Reporter: Ashutosh Chauhan
>
> Since in grunt parsing happens statement by statement and in file, whole of the script is considered, its possible to have different error messages. Problem here is that in file mode, most important error message is gobbled up and is not printed either on stdout/stderr or in logfile. In 0.8 it was correctly getting printed at stderr.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2263) Different error messages in grunt
mode and file mode
Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101390#comment-13101390 ]
Ashutosh Chauhan commented on PIG-2263:
---------------------------------------
Problem still persist even with the patch. In the script, query is well formed syntactically, so technically its not a syntax exception and I will argue that throwing parse exception here is an incorrect behavior. Query has a semantic problem because the loader is not returning the valid schema, so this should result in Semantic Exception from Pig and not parse exception as it is happening currently.
> Different error messages in grunt mode and file mode
> ----------------------------------------------------
>
> Key: PIG-2263
> URL: https://issues.apache.org/jira/browse/PIG-2263
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.9.0
> Reporter: Ashutosh Chauhan
> Attachments: PIG-2263-0.patch
>
>
> Since in grunt parsing happens statement by statement and in file, whole of the script is considered, its possible to have different error messages. Problem here is that in file mode, most important error message is gobbled up and is not printed either on stdout/stderr or in logfile. In 0.8 it was correctly getting printed at stderr.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2263) Different error messages in grunt
mode and file mode
Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095690#comment-13095690 ]
Ashutosh Chauhan commented on PIG-2263:
---------------------------------------
{code}
a = load 'default.boolean_table' using org.apache.hcatalog.pig.HCatLoader();
b = foreach a generate org.apache.hcatalog.utils.HCatTypeCheck('boolean+int', *);
store b into 'myout';
{code}
This is suppose to fail in grunt mode:
{code}
ERROR 1115: HCatalog column type 'BOOLEAN' is not supported in Pig as a column type
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2245:
<line 1, column 4> Cannot get schema from loadFunc org.apache.hcatalog.pig.HCatLoader
at org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:154)
at org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:109)
at org.apache.pig.newplan.logical.visitor.LineageFindRelVisitor.visit(LineageFindRelVisitor.java:100)
at org.apache.pig.newplan.logical.relational.LOLoad.accept(LOLoad.java:218)
at org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
at org.apache.pig.newplan.logical.visitor.CastLineageSetter.<init>(CastLineageSetter.java:57)
at org.apache.pig.PigServer$Graph.compile(PigServer.java:1677)
at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1609)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1581)
at org.apache.pig.PigServer.registerQuery(PigServer.java:583)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:942)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:188)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:164)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:67)
at org.apache.pig.Main.run(Main.java:487)
at org.apache.pig.Main.main(Main.java:108)
Caused by: org.apache.pig.PigException: ERROR 1115: HCatalog column type 'BOOLEAN' is not supported in Pig as a column type
at org.apache.hcatalog.pig.PigHCatUtil.getPigType(PigHCatUtil.java:281)
at org.apache.hcatalog.pig.PigHCatUtil.getPigType(PigHCatUtil.java:240)
at org.apache.hcatalog.pig.PigHCatUtil.getResourceSchemaFromFieldSchema(PigHCatUtil.java:189)
at org.apache.hcatalog.pig.PigHCatUtil.getResourceSchema(PigHCatUtil.java:163)
at org.apache.hcatalog.pig.HCatLoader.getSchema(HCatLoader.java:163)
at org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:150)
{code}
In file mode:
{code}
---------------
ERROR 1200: Pig script failed to parse:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 4, column 4> pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2245:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 3, column 4> Cannot get schema from loadFunc org.apache.hcatalog.pig.HCatLoader
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Pig script failed to parse:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 4, column 4> pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2245:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 3, column 4> Cannot get schema from loadFunc org.apache.hcatalog.pig.HCatLoader
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1638)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1583)
at org.apache.pig.PigServer.registerQuery(PigServer.java:583)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:942)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:188)
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:553)
at org.apache.pig.Main.main(Main.java:108)
Caused by: Failed to parse: Pig script failed to parse:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 4, column 4> pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2245:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 3, column 4> Cannot get schema from loadFunc org.apache.hcatalog.pig.HCatLoader
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:178)
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1630)
... 9 more
Caused by:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 4, column 4> pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2245:
<file ./out/pigtest/hortonas/hortonas.1314919813/hcat_negative_pig2pig_11.pig, line 3, column 4> Cannot get schema from loadFunc org.apache.hcatalog.pig.HCatLoader
at org.apache.pig.parser.LogicalPlanBuilder.buildForeachOp(LogicalPlanBuilder.java:430)
at org.apache.pig.parser.LogicalPlanGenerator.foreach_clause(LogicalPlanGenerator.java:10825)
at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1272)
at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:638)
at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:459)
at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:357)
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:171)
... 10 more
================================================================================
{code}
My concern is most important error message {{ERROR 1115: HCatalog column type 'BOOLEAN' is not supported in Pig as a column type}} doesnt get printed anywhere in file mode, while it used to in 0.8
> Different error messages in grunt mode and file mode
> ----------------------------------------------------
>
> Key: PIG-2263
> URL: https://issues.apache.org/jira/browse/PIG-2263
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.9.0
> Reporter: Ashutosh Chauhan
>
> Since in grunt parsing happens statement by statement and in file, whole of the script is considered, its possible to have different error messages. Problem here is that in file mode, most important error message is gobbled up and is not printed either on stdout/stderr or in logfile. In 0.8 it was correctly getting printed at stderr.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PIG-2263) Different error messages in grunt mode
and file mode
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-2263:
----------------------------
Attachment: PIG-2263-0.patch
Ashutosh, can you try the patch?
> Different error messages in grunt mode and file mode
> ----------------------------------------------------
>
> Key: PIG-2263
> URL: https://issues.apache.org/jira/browse/PIG-2263
> Project: Pig
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.9.0
> Reporter: Ashutosh Chauhan
> Attachments: PIG-2263-0.patch
>
>
> Since in grunt parsing happens statement by statement and in file, whole of the script is considered, its possible to have different error messages. Problem here is that in file mode, most important error message is gobbled up and is not printed either on stdout/stderr or in logfile. In 0.8 it was correctly getting printed at stderr.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira