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 2010/07/31 23:56:16 UTC

[jira] Created: (PIG-1531) Pig gobbles up error messages

Pig gobbles up error messages
-----------------------------

                 Key: PIG-1531
                 URL: https://issues.apache.org/jira/browse/PIG-1531
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Ashutosh Chauhan
             Fix For: 0.8.0


Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
{code}
010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log

{code}
Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "niraj rai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

niraj rai updated PIG-1531:
---------------------------

    Status: Patch Available  (was: Open)

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

    Attachment: pig-1531_3.patch

I took a look of the latest patch. There are two minor problems. Firstly, pigExec was always null and never assigned a value, so it resulted in NPE in certain code path. Second, the boolean logic in PigInputFormat needs && instead of ||. I thought of correcting it and committing. But then realized hudson hasnt come back with results yet. So, I am uploading a new patch with those corrections and submitting to Hudson again. In this patch, I also refactored a code a bit, so its easier to read. Have a look and if its look fine to you. Can you run test-patch and unit tests and paste results here, so I can commit it.

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "niraj rai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

niraj rai updated PIG-1531:
---------------------------

    Attachment: PIG_1531.patch

Fixed the code where it gives the relevent error message rather than giving the hard coded one.
  

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: PIG_1531.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

        Status: Resolved  (was: Patch Available)
    Resolution: Fixed

Committed to both trunk and 0.8. Thanks, Niraj!

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, pig-1531_4.patch, PIG-1531_5.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Reopened: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan reopened PIG-1531:
-----------------------------------


Peril of not writing unit test : Resurrection of bug. Argh..


> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

          Status: Resolved  (was: Patch Available)
    Hadoop Flags: [Reviewed]
      Resolution: Fixed

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Commented: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894935#action_12894935 ] 

Ashutosh Chauhan commented on PIG-1531:
---------------------------------------

Another instance where it happens is when input location doesnt exists, error message shown is 
{code}
org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Unable to create input splits for tmp_emtpy_1280539088
{code}
Whereas underlying exception did have more useful String which gets lost in log file
{code}
org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:
hdfs://machine.server.edu/tmp/pig/tmp_tables/tmp_empty_1280539088
{code}

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Commented: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894320#action_12894320 ] 

Ashutosh Chauhan commented on PIG-1531:
---------------------------------------

This is because in InputOutputFileVisitor#visit() Pig defines its own {{errMsg}} String and uses that to throw PlanValidationException. It should use the error String of the Exception it has caught. 
I have not checked at other places. But I have a hunch that it happens at few other places in Pig  as well.  This is a real usability issue since generic message is usually useless and Pig misses an opportunity to provide an useful bit of information in error scenarios. From that point on, user has to go open the log file and scroll among tens of lines of stack trace and only if she is familiar with Pig will spot that error String. 

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>             Fix For: 0.8.0
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Assigned: (PIG-1531) Pig gobbles up error messages

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich reassigned PIG-1531:
-----------------------------------

    Assignee: niraj rai

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

    Attachment: pig-1531_4.patch

Added a test-case which fails on trunk. Pig still gobbles up error messages. Fix is to rethrow the message in the hierarchy. Attached patch containis the test case and the fix.

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, pig-1531_4.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Commented: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913048#action_12913048 ] 

Ashutosh Chauhan commented on PIG-1531:
---------------------------------------

Oh Hudson, oh well...

Ran the full suite of 400 minutes of unit tests; all passed. Patch is ready for review.

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, pig-1531_4.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

    Status: Patch Available  (was: Reopened)

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, pig-1531_4.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

    Status: Open  (was: Patch Available)

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1531:
----------------------------------

    Status: Patch Available  (was: Open)

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Commented: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902576#action_12902576 ] 

Ashutosh Chauhan commented on PIG-1531:
---------------------------------------

* In addition to error Msg, you also need to set error code on the exception you are throwing.
* Since you are catching exceptions thrown by user code (StoreFunc Interface) it is not safe to assume that e.getMessage() will be non-null or non-empty string. This will result in NPE. You need to check for it and provide a generic error Msg in those cases.
* Generic error msg should also contain output location String. Since if user didnt provide it, that wont get printed. So, you can reword the message as "Output location validation failed for: <location>. More Information to follow:" 
* Since, PigException extends from IOException. The IOException you are catching can also be a PigException, you need to test if it is and then set the message and error code.
* In case of non-existent input location I am still seeing the generic message "ERROR 2997: Unable to recreate exception from backend error: org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Unable to create input splits for: file:///Users/chauhana/workspace/pig-1531/a" Though the full stack trace is printed at the end which contains the underlying error String. Its more confusing because now there are three different error messages amid a java stack trace.
* This warrants a testcase for regression purposes. (Infact error reporting behavior already changed since the time I opened this bug.)

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: PIG_1531.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "niraj rai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

niraj rai updated PIG-1531:
---------------------------

    Attachment: PIG-1531_5.patch

reviewed the patch and made the required changes after discussion with Ashutosh. Ran test-patch and unit test and everything looks fine.
Ashutosh, please commit the patch, if you don't have any further comment.
Thanks
Niraj

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, pig-1531_4.patch, PIG-1531_5.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Updated: (PIG-1531) Pig gobbles up error messages

Posted by "niraj rai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

niraj rai updated PIG-1531:
---------------------------

    Attachment: PIG_1531_2.patch

I have tried to accommodate all the recommendations from Ashutosh. I have changed the existing test case to validate the error message, in case the store directory exist. Writing test case for the case, when input file deos not exist was  more effort than fixing the actual fix. So, I verified it manually and they looked good.
Thanks
Niraj

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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


[jira] Commented: (PIG-1531) Pig gobbles up error messages

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904497#action_12904497 ] 

Ashutosh Chauhan commented on PIG-1531:
---------------------------------------

Niraj ran all the unit tests. All passed. No complaints from test-patch either. Committed to the trunk.
Thanks, Niraj !

> Pig gobbles up error messages
> -----------------------------
>
>                 Key: PIG-1531
>                 URL: https://issues.apache.org/jira/browse/PIG-1531
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: niraj rai
>             Fix For: 0.8.0
>
>         Attachments: pig-1531_3.patch, PIG_1531.patch, PIG_1531_2.patch
>
>
> Consider the following. I have my own Storer implementing StoreFunc and I am throwing FrontEndException (and other Exceptions derived from PigException) in its various methods. I expect those error messages to be shown in error scenarios. Instead Pig gobbles up my error messages and shows its own generic error message like: 
> {code}
> 010-07-31 14:14:25,414 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2116: Unexpected error. Could not validate the output specification for: default.partitoned
> Details at logfile: /Users/ashutosh/workspace/pig/pig_1280610650690.log
> {code}
> Instead I expect it to display my error messages which it stores away in that log file.

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