[ 
https://issues.apache.org/jira/browse/YARN-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061908#comment-15061908
 ] 

Gera Shegalov commented on YARN-2934:
-------------------------------------

That should go to the exception message
{code}
422      } else if (listStatus.length > 1) {
423           LOG.warn("Multiple files in " + containerLogDir
424               + ", seems to match the error file name pattern configured ");
425      }
{code}

Don't do branching, pass the string builder diagnosticInfo and do something like
{code}
diagnosticInfo
              .append("Error files: ")
              .append(Arrays.toString(listStatus))
              .append("\n")
              .append("Last ").append(tailBytes).append(" bytes of 
").append(listStatus[0])
              .append(new String(tailBytes, UTF_8));
{code}

> Improve handling of container's stderr 
> ---------------------------------------
>
>                 Key: YARN-2934
>                 URL: https://issues.apache.org/jira/browse/YARN-2934
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Gera Shegalov
>            Assignee: Naganarasimha G R
>            Priority: Critical
>         Attachments: YARN-2934.v1.001.patch, YARN-2934.v1.002.patch, 
> YARN-2934.v1.003.patch, YARN-2934.v1.004.patch, YARN-2934.v1.005.patch, 
> YARN-2934.v1.006.patch, YARN-2934.v1.007.patch, YARN-2934.v1.008.patch
>
>
> Most YARN applications redirect stderr to some file. That's why when 
> container launch fails with {{ExitCodeException}} the message is empty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to