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

Saisai Shao commented on SPARK-17814:
-------------------------------------

This looks like a YARN problem, after tracking the code path, I found that the 
command arguments are still correct in the Spark side:

{code}
16/10/12 15:26:50 INFO Client:     command:
16/10/12 15:26:50 INFO Client:         {{JAVA_HOME}}/bin/java -server -Xmx1024m 
-Djava.io.tmpdir={{PWD}}/tmp -Dspark.yarn.app.container.log.dir=<LOG_DIR> 
org.apache.spark.deploy.yarn.ApplicationMaster --class 
'org.apache.spark.examples.SparkPi' --arg '{\"mode\":\"wf\", 
\"arrays\":{\"array\":[1]}}' --properties-file 
{{PWD}}/__spark_conf__/__spark_conf__.properties 1> <LOG_DIR>/stdout 2> 
<LOG_DIR>/stderr
{code}

But in the Yarn {{launch_container.sh}}, the command changes to:

{code}
exec /bin/bash -c "$JAVA_HOME/bin/java -server -Xmx1024m 
-Djava.io.tmpdir=$PWD/tmp 
-Dspark.yarn.app.container.log.dir=/Users/sshao/projects/hadoop-2.7.1/logs/userlogs/application_1476255818919_0004/container_1476255818919_0004_01_000001
 org.apache.spark.deploy.yarn.ApplicationMaster --class 
'org.apache.spark.examples.SparkPi' --arg '{\"mode\":\"wf\", 
\"arrays\":{\"array\":[1]' --properties-file 
$PWD/__spark_conf__/__spark_conf__.properties 1> 
/Users/sshao/projects/hadoop-2.7.1/logs/userlogs/application_1476255818919_0004/container_1476255818919_0004_01_000001/stdout
 2> 
/Users/sshao/projects/hadoop-2.7.1/logs/userlogs/application_1476255818919_0004/container_1476255818919_0004_01_000001/stderr"
hadoop_shell_errorcode=$?
{code}

Here you can see "}}" is truncated. So I guess it might be a YARN issue, 
because YARN will replace some something like {{PWD}}.


> spark submit arguments are truncated in yarn-cluster mode
> ---------------------------------------------------------
>
>                 Key: SPARK-17814
>                 URL: https://issues.apache.org/jira/browse/SPARK-17814
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Submit, YARN
>    Affects Versions: 1.6.1
>            Reporter: shreyas subramanya
>            Priority: Minor
>
> {noformat}
> One of our customers is trying to pass in json through spark-submit as 
> follows:
> spark-submit --verbose --class SimpleClass --master yarn-cluster ./simple.jar 
> "{\"mode\":\"wf\", \"arrays\":{\"array\":[1]}}"
> The application reports the passed arguments as: {"mode":"wf", 
> "arrays":{"array":[1]
> If the same application is submitted in yarn-client mode, as follows:
> spark-submit --verbose --class SimpleClass --master yarn-client ./simple.jar 
> "{\"mode\":\"wf\", \"arrays\":{\"array\":[1]}}"
> The application reports the passed args as: {"mode":"wf", 
> "arrays":{"array":[1]}}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to