Inability to debug pig scripts due to ERROR 2999: "FrontendException cannot be 
cast to java.lang.Error" cast error
------------------------------------------------------------------------------------------------------------------

                 Key: PIG-751
                 URL: https://issues.apache.org/jira/browse/PIG-751
             Project: Pig
          Issue Type: Bug
          Components: grunt
    Affects Versions: 0.3.0
            Reporter: Viraj Bhat
             Fix For: 0.3.0


I have an input file which is being loaded by BinStorage()
{code}
myinput = LOAD 'partfile' USING BinStorage() AS (eid:long, url:chararray, 
title:chararray, index:int, num_candidates:int, num_inlinks:int, inlinks);

lim_myinput = limit myinput 100;

dump lim_myinput;

{code}

I get the following error: 
=========================================================================================================================================
2009-04-03 00:50:57,490 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
2999: Unexpected internal error. 
org.apache.pig.impl.logicalLayer.FrontendException cannot be cast to 
java.lang.Error
=========================================================================================================================================
ERROR 2999: Unexpected internal error. 
org.apache.pig.impl.logicalLayer.FrontendException cannot be cast to 
java.lang.Error
java.lang.ClassCastException: 
org.apache.pig.impl.logicalLayer.FrontendException cannot be cast to 
java.lang.Error
        at 
org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:1098)
        at 
org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:804)
        at 
org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:595)
        at 
org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
        at org.apache.pig.PigServer.parseQuery(PigServer.java:311)
        at org.apache.pig.PigServer.registerQuery(PigServer.java:277)
        at 
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:529)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:280)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:99)
        at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:88)
        at org.apache.pig.Main.main(Main.java:352)
=========================================================================================================================================
It seems that the error is caused during the schema creation, in BinStorage(), 
however this error is not reported!! If I use PigStorage() the error goes away 
but the results are incorrect.
{code}
myinput = LOAD 'partfile' USING PigStorage() AS (eid:long, url:chararray, 
title:chararray, index:int, num_candidates:int, num_inlinks:int, inlinks);
{code}

Currently it is not possible to find out where the error really occurred but to 
manually inspect each keyword.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to