hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1175) LogLength shown in $ yarn logs is 1 character longer than actual stdout
Date Mon, 09 Sep 2013 22:24:52 GMT

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

Jason Lowe commented on YARN-1175:
----------------------------------

It is consistent with the contents of the log.  If nothing is ever printed to a log file then
the log file has zero bytes in it and the log length is correctly reported as zero.  If a
single {{echo}} is used then the log contents are correctly reported as 1 since {{echo}} will
output a single newline character when given no additional arguments.  This is analogous to
this situation with a regular shell session:

{noformat}
$ > /tmp/x  
$ echo > /tmp/y
$ ls -l /tmp/[xy]
-rw-r--r-- 1 user group 0 Sep  9 22:22 /tmp/x
-rw-r--r-- 1 user group 1 Sep  9 22:22 /tmp/y
{noformat}

Note that /tmp/x has a size of 0 and /tmp/y has a size of 1.  LogLength is simply reporting
the number of bytes in the logfile, and not all of those bytes are visible characters.
                
> LogLength shown in $ yarn logs is 1 character longer than actual stdout
> -----------------------------------------------------------------------
>
>                 Key: YARN-1175
>                 URL: https://issues.apache.org/jira/browse/YARN-1175
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: applications/distributed-shell
>            Reporter: Tassapol Athiapinya
>             Fix For: 2.1.1-beta
>
>
> Run distributed shell with -shell_command "pwd". Do $ yarn logs on that application.
> Count number of characters in Log Contents field. Number of characters will be smaller
than LogLength field by one.
> {code:title=mock-up yarn logs output}
> $ /usr/bin/yarn logs -applicationId application_1378424977532_0088
> ...
> LogType: stdout
> LogLength: 87
> Log Contents:
> /mypath/appcache/application_1378424977532_0088/container_1378424977532_0088_01_000002
> {code}
> ----
> {panel}
> Th length of 
> "/mypath/appcache/application_1378424977532_0088/container_1378424977532_0088_01_000002"
> is 86.
> {panel}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message