You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2018/07/12 17:28:00 UTC

[jira] [Updated] (PIG-5349) Log stderr output when shell command fail

     [ https://issues.apache.org/jira/browse/PIG-5349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Noguchi updated PIG-5349:
------------------------------
    Attachment: pig-5349-v1.patch

Attaching a straightforward patch that would update the log to 

{panel}
2018-07-12 13:25:50,101 [main] INFO  org.apache.pig.tools.parameters.PreprocessorContext - Executing command : /bin/bash doesnotexist.sh
{color:red}2018-07-12 13:25:50,123 [main] WARN  org.apache.pig.tools.parameters.PreprocessorContext - Stderr output from command: /bin/bash doesnotexist.sh
2018-07-12 13:25:50,123 [main] WARN  org.apache.pig.tools.parameters.PreprocessorContext - /bin/bash: doesnotexist.sh: No such file or directory{color}
2018-07-12 13:25:50,144 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Error executing shell command: /bin/bash doesnotexist.sh. Command exit with exit code of 127
{panel}

> Log stderr output when shell command fail
> -----------------------------------------
>
>                 Key: PIG-5349
>                 URL: https://issues.apache.org/jira/browse/PIG-5349
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Koji Noguchi
>            Priority: Trivial
>         Attachments: pig-5349-v1.patch
>
>
> For a script likeĀ 
> {code}
> %declare abc `/bin/bash doesnotexist.sh`
> {code}
> Pig currently fails with the message
> {noformat}
> 2018-07-12 13:21:28,364 [main] INFO  org.apache.pig.tools.parameters.PreprocessorContext - Executing command : /bin/bash doesnotexist.sh
> 2018-07-12 13:21:28,399 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Error executing shell command: /bin/bash doesnotexist.sh. Command exit with exit code of 127
> {noformat}
> It'll be nice if we can show the error message from the script.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)