hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Francisoud (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-100) Tests: NullPointerException parser.QueryParser.Alias(QueryParser.java:471)
Date Mon, 03 Mar 2008 11:18:50 GMT

    [ https://issues.apache.org/jira/browse/PIG-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574436#action_12574436
] 

Benjamin Francisoud commented on PIG-100:
-----------------------------------------

Johannes would you prefer this ? (added throw)
{code:java}
try {
    plan = parser.Parse();
} catch (ParseException e) {
    log.error(e.getMessage());
    log.debug(e);
    throw e;
}
{code}
About the double logging, I proposed this because:
* Stefan (and I ;) )wanted the full stacktrace
* Olga wanted a small user friendly message

The message will be logged twice and will look like (if DEBUG level is use for logs): 
{noformat}
[time] [class] Unable to find alias: 'A' - aliases: ''
[time] [class] org.apache.pig.impl.logicalLayer.parser.ParseException: Unable to find alias:
'A' - aliases: ''
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.Alias(QueryParser.java:484)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedExpr(QueryParser.java:411)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedExpr(QueryParser.java:417)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.GroupItem(QueryParser.java:1043)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.CogroupClause(QueryParser.java:996)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:537)
...
{noformat}

It will look like this (if log level is ERROR, usually in a production environment):
{noformat}
[time] [class] Unable to find alias: 'A' - aliases: ''
{noformat}

Johannes, do you prefer this ? Do you have something else in mind ?

> Tests: NullPointerException parser.QueryParser.Alias(QueryParser.java:471)
> --------------------------------------------------------------------------
>
>                 Key: PIG-100
>                 URL: https://issues.apache.org/jira/browse/PIG-100
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.1.0
>            Reporter: Benjamin Francisoud
>            Priority: Minor
>         Attachments: PIG-100-tests.log, PIG-100-v01.patch, PIG-100-v02.patch
>
>
> I think the root problem was that I forget to specify the configuration using -Djunit.hadoop.conf=hadoop-site.xml
while running the tests.
> But the error could be clearer...
> The logs are big so I will provide them in a separate file...
> But the core problem is:
> {noformat}
>     [junit] java.lang.NullPointerException
>     [junit] 	at org.apache.pig.impl.logicalLayer.parser.QueryParser.Alias(QueryParser.java:471)
>     [junit] 	at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedExpr(QueryParser.java:411)
>     [junit] 	at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedExpr(QueryParser.java:417)
>     [junit] 	at org.apache.pig.impl.logicalLayer.parser.QueryParser.GroupItem(QueryParser.java:1027)
> ...
>     [junit] org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "group"
at line 1, column 9.
>     [junit] Was expecting one of:
>     [junit]     <IDENTIFIER> ...
>     [junit]     "(" ...
>     [junit]     
>     [junit] 	at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:4142)
> ...
>     [junit] org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "generate"
at line 1, column 1.
>     [junit] Was expecting one of:
>     [junit]     "load" ...
>     [junit]     "filter" ...
> {noformat}

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


Mime
View raw message