[
https://issues.apache.org/jira/browse/YARN-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834399#comment-13834399
]
Xuan Gong commented on YARN-1450:
---------------------------------
Let us take a look at an example:
This is the cmd we are giving:
JAVA_HOME /bin/java -Xmx512m
org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster
--shell_command pwd;ls --num_containers 5
because of ";" in the shell_command we are giving, the actual cmd launched for
AM will become JAVA_HOME /bin/java -Xmx512m
org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster
--shell_command pwd.
Then AM will launch the container with --shell_command pwd.
Apparently, the container gets the wrong shell_command. Right ??
If we save --shell_command into a file, then the command launch for AM will
become:
JAVA_HOME /bin/java -Xmx512m
org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster
--num_containers 5.
Then AM can read shell_command back from the file, and launch 5 containers with
shell_command pwd;ls.
Of course, the container will not get expect result. But What we are doing here
is let containers launch exact the same shell_commands that the clients give us.
Make sense ?
> TestUnmanagedAMLauncher#testDSShell fails on trunk
> --------------------------------------------------
>
> Key: YARN-1450
> URL: https://issues.apache.org/jira/browse/YARN-1450
> Project: Hadoop YARN
> Issue Type: Bug
> Components: applications/distributed-shell
> Reporter: Akira AJISAKA
> Assignee: Binglin Chang
> Attachments: YARN-1450.v1.patch, YARN-1450.v2.patch,
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher-output.txt,
>
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher.txt
>
>
> TestUnmanagedAMLauncher fails on trunk. The console output is
> {code}
> Running
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 35.937 sec
> <<< FAILURE! - in
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher
> testDSShell(org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher)
> Time elapsed: 14.558 sec <<< ERROR!
> java.lang.RuntimeException: Failed to receive final expected state in
> ApplicationReport, CurrentState=ACCEPTED,
> ExpectedStates=FINISHED,FAILED,KILLED
> at
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher.monitorApplication(UnmanagedAMLauncher.java:447)
> at
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.UnmanagedAMLauncher.run(UnmanagedAMLauncher.java:352)
> at
> org.apache.hadoop.yarn.applications.unmanagedamlauncher.TestUnmanagedAMLauncher.testDSShell(TestUnmanagedAMLauncher.java:145)
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)