[
https://issues.apache.org/jira/browse/YARN-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13802253#comment-13802253
]
Xuan Gong commented on YARN-1314:
---------------------------------
I am using "--shell_command echo --shell_args HADOOP YARN MAPREDUCE HDFS" to do
the test
Before applied the patch :
The shell script for launching the container will be something like :
{code}
exec /bin/bash -c "echo HADOOP
1>/Users/xuan/dep/hadoop-3.0.0-SNAPSHOT/logs/application_1382474044210_0001/container_1382474044210_0001_01_000002/stdout
2>/Users/xuan/dep/hadoop-3.0.0-SNAPSHOT/logs/application_1382474044210_0001/container_1382474044210_0001_01_000002/stderr
"
{code}
And the output will only show "HADOOP"
After I applied the patch.
The shell script for launching the container will be something like this:
{code}
exec /bin/bash -c "echo HADOOP YARN MAPREDUCE HDFS
1>/Users/xuan/dep/hadoop-3.0.0-SNAPSHOT/logs/application_1382474749963_0001/container_1382474749963_0001_01_000002/stdout
2>/Users/xuan/dep/hadoop-3.0.0-SNAPSHOT/logs/application_1382474749963_0001/container_1382474749963_0001_01_000002/stderr
"
{code}
Then the output will show "HADOOP YARN MAPREDUCE HDFS" as we expected
> Cannot pass more than 1 argument to shell command
> -------------------------------------------------
>
> Key: YARN-1314
> URL: https://issues.apache.org/jira/browse/YARN-1314
> Project: Hadoop YARN
> Issue Type: Bug
> Components: applications/distributed-shell
> Reporter: Tassapol Athiapinya
> Assignee: Xuan Gong
> Fix For: 2.2.1
>
> Attachments: YARN-1314.1.patch, YARN-1314.1.patch, YARN-1314.2.patch
>
>
> Distributed shell cannot accept more than 1 parameters in argument parts.
> All of these commands are treated as 1 parameter:
> /usr/bin/yarn org.apache.hadoop.yarn.applications.distributedshell.Client
> -jar <distrubuted shell jar> -shell_command echo -shell_args "'"My name"
> "is Teddy"'"
> /usr/bin/yarn org.apache.hadoop.yarn.applications.distributedshell.Client
> -jar <distrubuted shell jar> -shell_command echo -shell_args "''My name'
> 'is Teddy''"
> /usr/bin/yarn org.apache.hadoop.yarn.applications.distributedshell.Client
> -jar <distrubuted shell jar> -shell_command echo -shell_args "'My name'
> 'is Teddy'"
--
This message was sent by Atlassian JIRA
(v6.1#6144)