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

Omkar Vinit Joshi commented on YARN-1303:
-----------------------------------------

{code}
+        "For multiple shell scripts, combine them " +
+        "into one shell script");
{code}
please remove. I think it is intuitive.
Similarly the exception code message

{code}
+    if (shellCommand.contains(";") || shellCommand.contains("|")) {
+      throw new IllegalArgumentException(
+          "DistributedShell does not support multiple commands " +
+          "or command pipeline. Please create a shell script for " +
+          "them and use --shell_script option");
+    }
+    if (shellCommand.contains(">")) {
+      throw new IllegalArgumentException(
+          "Please create a shell script for redirected output " +
+          "and use --shell_script option");
+    }
+
{code}
This will not work on windows. [link| 
http://superuser.com/questions/62850/execute-multiple-commands-with-1-line-in-windows-commandline]
 Think about it. Make it not OS specific. Btw do we really need to parse and 
tell user that you are indeed using multiple commands instead of allowed one? 
Now we are putting this in help message I think this validation checks will 
complicate the stuff. thoughts?


> Allow multiple commands separating with ";" in distributed-shell
> ----------------------------------------------------------------
>
>                 Key: YARN-1303
>                 URL: https://issues.apache.org/jira/browse/YARN-1303
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: applications/distributed-shell
>            Reporter: Tassapol Athiapinya
>            Assignee: Xuan Gong
>             Fix For: 2.2.1
>
>         Attachments: YARN-1303.1.patch, YARN-1303.2.patch, YARN-1303.3.patch, 
> YARN-1303.3.patch, YARN-1303.4.patch, YARN-1303.4.patch, YARN-1303.5.patch, 
> YARN-1303.6.patch
>
>
> In shell, we can do "ls; ls" to run 2 commands at once. 
> In distributed shell, this is not working. We should improve to allow this to 
> occur. There are practical use cases that I know of to run multiple commands 
> or to set environment variables before a command.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to