hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Welch (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-3211) Do not use zero as the beginning number for commands for LinuxContainerExecutor
Date Fri, 01 May 2015 20:43:09 GMT

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

Craig Welch commented on YARN-3211:
-----------------------------------

Can you add comments in code explaining why the enum starts at 1 so that it is not confusing
to others who look at the code down the line?  Can you add a test for the change?  What will
happen after this change if the parsing encounters a non-numeric string?

> Do not use zero as the beginning number for commands for LinuxContainerExecutor
> -------------------------------------------------------------------------------
>
>                 Key: YARN-3211
>                 URL: https://issues.apache.org/jira/browse/YARN-3211
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Liang-Chi Hsieh
>            Priority: Minor
>         Attachments: YARN-3211.patch
>
>
> Current the implementation of LinuxContainerExecutor and container-executor uses some
numbers as its commands. The commands begin from zero (INITIALIZE_CONTAINER).
> When LinuxContainerExecutor gives the numeric command as the command line parameter to
run container-executor. container-executor calls atoi() to parse the command string to integer.
> However, we know that atoi() will return zero when it can not parse the string to integer.
So if you give an non-numeric command, container-executor still accepts it and runs INITIALIZE_CONTAINER
command.
> I think it is wrong and we should not use zero as the beginning number of the commands.



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

Mime
View raw message