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

Ivan Mitic commented on YARN-1865:
----------------------------------

Thanks Remus for the patch!

I have two minor comments:
1. Shell#checkWindowsCommandLineLength: Can you please add a comment saying 
that caller is responsible to account for spaces between individual commands. 
It might also be useful to include info in the message on what the command 
actual length was and first 100 chars or so that it's even easier to pinpoint 
the problem.
2. ContainerLaunch: Would you mind also including unittest that validates that 
errorCheck() works as expected on Windows/Linux. Just do it for one random 
command (e.q. mkdirs with invalid chars in the name), no need to do it for all.

Otherwise, the patch looks good to me. 

> ShellScriptBuilder does not check for some error conditions
> -----------------------------------------------------------
>
>                 Key: YARN-1865
>                 URL: https://issues.apache.org/jira/browse/YARN-1865
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 3.0.0, 2.2.0, 2.3.0
>            Reporter: Remus Rusanu
>            Assignee: Remus Rusanu
>            Priority: Minor
>         Attachments: YARN-1865.1.patch, YARN-1865.2.patch
>
>
> The WindowsShellScriptBuilder does not check for commands exceeding windows 
> maximum shell command line length (8191 chars)
> Neither Unix  nor Windows script builder do not check for error condition 
> after mkdir nor link
> WindowsShellScriptBuilder mkdir is not safe with regard to paths containing 
> spaces



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to