Grokbase Groups Pig dev February 2008
FAQ
grunt should show full exception stack
--------------------------------------

Key: PIG-98
URL: https://issues.apache.org/jira/browse/PIG-98
Project: Pig
Issue Type: Improvement
Components: grunt
Reporter: Stefan Groschupf
Priority: Minor
Fix For: 0.1.0


I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
grunt> B = FILTER A BY cat == 'book';
grunt> dump B;
For input string: "book"
Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.

At least for this early stage it would developers and users to find problems faster.


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

Search Discussions

  • Stefan Groschupf (JIRA) at Feb 8, 2008 at 12:37 am
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Stefan Groschupf updated PIG-98:
    --------------------------------

    Attachment: showStackTrace-20080207.patch

    simply stringify the exception stack - hadoop style.
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Alan Gates (JIRA) at Feb 20, 2008 at 1:01 am
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570518#action_12570518 ]

    Alan Gates commented on PIG-98:
    -------------------------------

    I agree with you that much of our error reporting is horrible. However, we are trying to get hadoop specific stuff out of the front end of pig. So we don't want to use hadoop's stringifyException function in grunt. So we'll need to lookfor for another way to mitigate this short term before we solve it long term.
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Stefan Groschupf (JIRA) at Feb 20, 2008 at 1:07 am
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570525#action_12570525 ]

    Stefan Groschupf commented on PIG-98:
    -------------------------------------

    How about a PigString Util that basically has the same kind of stringify method?
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Benjamin Francisoud (JIRA) at Feb 20, 2008 at 9:53 am
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570632#action_12570632 ]

    francisoud edited comment on PIG-98 at 2/20/08 1:52 AM:
    -----------------------------------------------------------------

    I think this one has been fix in PIG-83

    Now the code looks like [GruntParser.java|http://svn.apache.org/repos/asf/incubator/pig/trunk/src/org/apache/pig/tools/grunt/GruntParser.java] :
    {code:java}
    catch(Exception e)
    {
    log.error(e.getMessage());
    }
    {code}
    You should get the full stacktrace when an error occurs.

    was (Author: francisoud):
    I think this one has been fix in PIG-83

    Now the code looks like:
    {code:java}
    catch(Exception e)
    {
    log.error(e.getMessage());
    }
    {code}
    You should get the full stacktrace when an error occurs.
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Alan Gates (JIRA) at Feb 20, 2008 at 4:10 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570727#action_12570727 ]

    Alan Gates commented on PIG-98:
    -------------------------------

    With the top of trunk, the script you give above produces:

    2008-02-19 16:55:14,898 [main] ERROR org.apache.pig - Error message from task (map) tip_200802061204_1977_m_000000 java.lang.NumberFormatException: For input string: "ulysses thompson"
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
    at java.lang.Double.valueOf(Double.java:475)
    at java.lang.Double.(DataAtom.java:95)
    at org.apache.pig.impl.eval.cond.CompCond.eval(CompCond.java:77)
    at org.apache.pig.impl.eval.FilterSpec$1.add(FilterSpec.java:58)
    at org.apache.pig.impl.mapreduceExec.PigMapReduce.run(PigMapReduce.java:115)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:192)
    at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1760)


    This is still not useful, but at least we're giving the full stack. I want to leave this bug open though, because we should be giving decent error messages here (like == not valid with string type or something).
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Feb 21, 2008 at 12:35 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571031#action_12571031 ]

    Pi Song commented on PIG-98:
    ----------------------------

    Just want to share my thought here.

    1. Log messages and application messages are different and should be treated differently. I am still not quite convinced about the way that logging framework is used for reporting error messages to user.

    2. The interactive error messages in Grunt should be "user-friendly" shell level error message where in-depth details are logged using logging framework.

    3. In case the user wants to see stacktrace in Grunt, that can be optional (which might be considered on by default as I believe most users are developers rather than end-users). It can be turned on/off like the way "set debug on" works.

    4. For embedded Pig engine, the PigException thrown from the engine should contain "User-friendly" error message plus the stacktrace in inner exception wrapped inside the PigException (Like the way SQLException works in most languages)

    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Benjamin Francisoud (JIRA) at Feb 21, 2008 at 3:20 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571066#action_12571066 ]

    Benjamin Francisoud commented on PIG-98:
    ----------------------------------------

    I agree with Alan Gates and Pi Song, this error is not really user-friendly :(

    I not familiar with javacc but is there a way like in xml with dtd or xml schema to validate the script's syntax before running it ?
    According to this page: https://javacc.dev.java.net/doc/errorrecovery.html
    javacc has already an error handling system with custom Exception just for that case ?!

    For the [javacc page|https://javacc.dev.java.net/doc/errorrecovery.html]:
    {quote}Whenever the parser detects a problem, it throws the exception ParseException. Previously, it used to print the message:

    Encountered ... Was expecting one of ...{quote}

    It's may be just a matter of improving one of the .jj file to catch such error (my 2 cents)

    I suppose we could then do something like:
    {code:java}
    } catch(ParseException e) {
    System.err.println(e.getMessage());
    if (verbose == true) {
    log.error(e);
    }
    } catch(Exception e) {
    // all other case than can occur...
    log.error(e.);
    }
    {code}

    did anything that I said make sense ?
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Benjamin Francisoud (JIRA) at Feb 21, 2008 at 3:22 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571066#action_12571066 ]

    francisoud edited comment on PIG-98 at 2/21/08 7:20 AM:
    -----------------------------------------------------------------

    I agree with Alan Gates and Pi Song, this error is not really user-friendly :(

    I am not familiar with javacc but is there a way like in xml with dtd or xml schema to validate the script's syntax before running it ?
    According to this page: https://javacc.dev.java.net/doc/errorrecovery.html
    javacc has already an error handling system with custom Exception just for that case ?!

    For the [javacc page|https://javacc.dev.java.net/doc/errorrecovery.html]:
    {quote}Whenever the parser detects a problem, it throws the exception ParseException. Previously, it used to print the message:

    Encountered ... Was expecting one of ...{quote}

    It's may be just a matter of improving one of the .jj file to catch such error (my 2 cents)

    I suppose we could then do something like:
    {code:java}
    } catch(ParseException e) {
    System.err.println(e.getMessage());
    if (verbose == true) {
    log.error(e);
    }
    } catch(Exception e) {
    // all other case than can occur...
    log.error(e.);
    }
    {code}

    did anything that I said make sense ?

    was (Author: francisoud):
    I agree with Alan Gates and Pi Song, this error is not really user-friendly :(

    I not familiar with javacc but is there a way like in xml with dtd or xml schema to validate the script's syntax before running it ?
    According to this page: https://javacc.dev.java.net/doc/errorrecovery.html
    javacc has already an error handling system with custom Exception just for that case ?!

    For the [javacc page|https://javacc.dev.java.net/doc/errorrecovery.html]:
    {quote}Whenever the parser detects a problem, it throws the exception ParseException. Previously, it used to print the message:

    Encountered ... Was expecting one of ...{quote}

    It's may be just a matter of improving one of the .jj file to catch such error (my 2 cents)

    I suppose we could then do something like:
    {code:java}
    } catch(ParseException e) {
    System.err.println(e.getMessage());
    if (verbose == true) {
    log.error(e);
    }
    } catch(Exception e) {
    // all other case than can occur...
    log.error(e.);
    }
    {code}

    did anything that I said make sense ?
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Alan Gates (JIRA) at Feb 21, 2008 at 3:39 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571077#action_12571077 ]

    Alan Gates commented on PIG-98:
    -------------------------------

    The issue here isn't syntactic, it's semantic. Grammatically the query given is valid. The issue is that pig doesn't currently have types beyond string, so we force the user to tell us what type a constant is by choosing == or eq. The parser has no way to determine whether the user chose correctly, since it doesn't have a type system.

    With the work on types being done in the type branch, these issues will be resolved. The perlish ==/eq split will go away (though eq will still be supported for backward compatibility) and numeric constants will be recognized (e.g. a = filter b where $1 > 5 instead of where $1 > '5') and comparison operators such as == will be valid for strings (so the above query should work then).

    It will be a couple of months before we have this working.
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Benjamin Francisoud (JIRA) at Feb 21, 2008 at 3:58 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571084#action_12571084 ]

    Benjamin Francisoud commented on PIG-98:
    ----------------------------------------

    Ok I understand better the issue now, thanks for taking time to explain it Alan :)
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Feb 28, 2008 at 7:10 pm
    [ https://issues.apache.org/jira/browse/PIG-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-98:
    ------------------------------

    Patch Info: (was: [Patch Available])
    grunt should show full exception stack
    --------------------------------------

    Key: PIG-98
    URL: https://issues.apache.org/jira/browse/PIG-98
    Project: Pig
    Issue Type: Improvement
    Components: grunt
    Reporter: Stefan Groschupf
    Priority: Minor
    Fix For: 0.1.0

    Attachments: showStackTrace-20080207.patch


    I suggest grunt should be more helpful with user errors. I just did one (a stupid one) and it took my too long to figure out the problem, since grunts error message was just not giving me a good hint:
    grunt> A = LOAD '/pigtestData.tsv' USING PigStorage(',') AS (user,age,cat);
    grunt> B = FILTER A BY cat == 'book';
    grunt> dump B;
    For input string: "book"
    Experts will see that I tried to use == instead of eq, however especially new users could get a little confused.
    I see two chances add Error Number and descriptive texts (Oracle style) - this quite a lot of work, or for now I suggest to simply dump the full exception text.
    At least for this early stage it would developers and users to find problems faster.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedFeb 8, '08 at 12:35a
activeFeb 28, '08 at 7:10p
posts12
users1
websitepig.apache.org

1 user in discussion

Olga Natkovich (JIRA): 12 posts

People

Translate

site design / logo © 2022 Grokbase