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

Ivan Mitic commented on YARN-493:
---------------------------------

Hi Chris, patch looks good

Just one question, would make sense to expose common Shell/Test utilities that 
would abstract out the following 2 patterns (mainly used in tests):

{code}
          if (Path.WINDOWS) {
            commands.add("cmd");
            commands.add("/c");
            commands.add(scriptFile.getAbsolutePath());
          } else {
            commands.add("/bin/bash");
            commands.add(scriptFile.getAbsolutePath());
          }
{code}

{code}
          File scriptFile = new File(tmpDir, Path.WINDOWS ? "scriptFile.cmd" :
            "scriptFile.sh");
{code}

This should help with code readability and will also simplify the cross 
platform support. Otherwise, +1 from me

                
> NodeManager job control logic flaws on Windows
> ----------------------------------------------
>
>                 Key: YARN-493
>                 URL: https://issues.apache.org/jira/browse/YARN-493
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>             Fix For: 3.0.0
>
>         Attachments: YARN-493.1.patch
>
>
> Both product and test code contain some platform-specific assumptions, such 
> as availability of bash for executing a command in a container and signals to 
> check existence of a process and terminate it.

--
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

Reply via email to