@@ -104,7 +104,7 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
104104 " --master" , " yarn" , " --executor-memory" , " 5g" , " --executor-cores" , " 5" ,
105105 " --class" , " org.SomeClass" , " --jars" , " one.jar,two.jar,three.jar" ,
106106 " --driver-memory" , " 4g" , " --queue" , " thequeue" , " --files" , " file1.txt,file2.txt" ,
107- " --archives" , " archive1.txt,archive2.txt" , " --num-executors" , " 6" ,
107+ " --archives" , " archive1.txt,archive2.txt" , " --num-executors" , " 6" , " --name " , " beauty " ,
108108 " thejar.jar" , " arg1" , " arg2" )
109109 val appArgs = new SparkSubmitArguments (clArgs)
110110 val (childArgs, classpath, sysProps, mainClass) = createLaunchEnv(appArgs)
@@ -122,16 +122,17 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
122122 childArgsStr should include (" --num-executors 6" )
123123 mainClass should be (" org.apache.spark.deploy.yarn.Client" )
124124 classpath should have length (0 )
125- sysProps should have size (1 )
125+ sysProps(" spark.app.name" ) should be (" beauty" )
126+ sysProps(" SPARK_SUBMIT" ) should be (" true" )
126127 }
127128
128129 test(" handles YARN client mode" ) {
129130 val clArgs = Seq (" --deploy-mode" , " client" ,
130131 " --master" , " yarn" , " --executor-memory" , " 5g" , " --executor-cores" , " 5" ,
131132 " --class" , " org.SomeClass" , " --jars" , " one.jar,two.jar,three.jar" ,
132133 " --driver-memory" , " 4g" , " --queue" , " thequeue" , " --files" , " file1.txt,file2.txt" ,
133- " --archives" , " archive1.txt,archive2.txt" , " --num-executors" , " 6" , " thejar.jar " ,
134- " arg1" , " arg2" )
134+ " --archives" , " archive1.txt,archive2.txt" , " --num-executors" , " 6" , " --name " , " trill " ,
135+ " thejar.jar " , " arg1" , " arg2" )
135136 val appArgs = new SparkSubmitArguments (clArgs)
136137 val (childArgs, classpath, sysProps, mainClass) = createLaunchEnv(appArgs)
137138 childArgs.mkString(" " ) should be (" arg1 arg2" )
@@ -140,6 +141,7 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
140141 classpath should contain (" one.jar" )
141142 classpath should contain (" two.jar" )
142143 classpath should contain (" three.jar" )
144+ sysProps(" spark.app.name" ) should be (" trill" )
143145 sysProps(" spark.executor.memory" ) should be (" 5g" )
144146 sysProps(" spark.executor.cores" ) should be (" 5" )
145147 sysProps(" spark.yarn.queue" ) should be (" thequeue" )
0 commit comments