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

Xuan Gong commented on YARN-1303:
---------------------------------

We can do something like this :  deprecate shell_args, we set --shell_commad 
with command and args. Also, we only support one --shell_command, if the client 
set more than one --shell_command, we can output a message and say something 
like this :"We do not support multiple shell_command options, you can create a 
shell script with multiple shell commands, and use --shell_script. OR you can 
combine all the shell_commands together, separate with ';' and use only one 
--shell_command". (Should do the similar thing with shell_script, support only 
one shell_script option). Also we may use '\' to escape the special characters 
(such as ';' and '|'). In that case, the script running for ApplicationMaster 
will become something like "--shell_command c1 arg1 arg2 \; c2 arg3 arg4". At 
applicationMaster code, we try to separate the commands if there is any ';'. In 
that case, the script in each container will become something like "c1 arg1 
arg2 1>stdout 2>stderror", and "c2 arg3 arg4 1>>stdout 2>>stderror". We 
separate the commands.

> Allow multiple commands separating with ;
> -----------------------------------------
>
>                 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
>
>
> 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