@@ -40,14 +40,14 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
40
40
childArgsStr should include (" --jar thejar.jar" )
41
41
childArgsStr should include (" --class org.SomeClass" )
42
42
childArgsStr should include (" --addJars one.jar,two.jar,three.jar" )
43
- childArgsStr should include (" --worker -memory 5g" )
44
- childArgsStr should include (" --master -memory 4g" )
45
- childArgsStr should include (" --worker -cores 5" )
43
+ childArgsStr should include (" --executor -memory 5g" )
44
+ childArgsStr should include (" --driver -memory 4g" )
45
+ childArgsStr should include (" --executor -cores 5" )
46
46
childArgsStr should include (" --args arg1 --args arg2" )
47
47
childArgsStr should include (" --queue thequeue" )
48
48
childArgsStr should include (" --files file1.txt,file2.txt" )
49
49
childArgsStr should include (" --archives archive1.txt,archive2.txt" )
50
- childArgsStr should include (" --num-workers 6" )
50
+ childArgsStr should include (" --num-executors 6" )
51
51
mainClass should be (" org.apache.spark.deploy.yarn.Client" )
52
52
classpath should have length (0 )
53
53
sysProps should have size (0 )
@@ -69,22 +69,22 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
69
69
classpath should contain (" two.jar" )
70
70
classpath should contain (" three.jar" )
71
71
sysProps(" spark.executor.memory" ) should be (" 5g" )
72
- sysProps(" spark.cores.max " ) should be (" 5" )
72
+ sysProps(" spark.executor.cores " ) should be (" 5" )
73
73
sysProps(" spark.yarn.queue" ) should be (" thequeue" )
74
74
sysProps(" spark.yarn.dist.files" ) should be (" file1.txt,file2.txt" )
75
75
sysProps(" spark.yarn.dist.archives" ) should be (" archive1.txt,archive2.txt" )
76
- sysProps(" spark.worker .instances" ) should be (" 6" )
76
+ sysProps(" spark.executor .instances" ) should be (" 6" )
77
77
}
78
78
79
79
test(" handles standalone cluster mode" ) {
80
80
val clArgs = Array (" thejar.jar" , " --deploy-mode" , " cluster" ,
81
- " --master" , " spark://h:p" , " --executor-memory" , " 5g" , " --executor-cores" , " 5" ,
82
- " --class" , " org.SomeClass" , " --arg" , " arg1" , " --arg" , " arg2" , " --supervise" ,
83
- " --driver-memory" , " 4g" )
81
+ " --master" , " spark://h:p" , " --class" , " org.SomeClass" , " --arg" , " arg1" , " --arg" , " arg2" ,
82
+ " --supervise" , " --driver-memory" , " 4g" , " --driver-cores" , " 5" )
84
83
val appArgs = new SparkSubmitArguments (clArgs)
85
84
val (childArgs, classpath, sysProps, mainClass) = createLaunchEnv(appArgs)
86
85
val childArgsStr = childArgs.mkString(" " )
87
- childArgsStr.startsWith(" --memory 5g --cores 5 --supervise" ) should be (true )
86
+ print(" child args: " + childArgsStr)
87
+ childArgsStr.startsWith(" --memory 4g --cores 5 --supervise" ) should be (true )
88
88
childArgsStr should include (" launch spark://h:p thejar.jar org.SomeClass arg1 arg2" )
89
89
mainClass should be (" org.apache.spark.deploy.Client" )
90
90
classpath should have length (0 )
@@ -93,7 +93,7 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
93
93
94
94
test(" handles standalone client mode" ) {
95
95
val clArgs = Array (" thejar.jar" , " --deploy-mode" , " client" ,
96
- " --master" , " spark://h:p" , " --executor-memory" , " 5g" , " --executor-cores" , " 5" ,
96
+ " --master" , " spark://h:p" , " --executor-memory" , " 5g" , " --total- executor-cores" , " 5" ,
97
97
" --class" , " org.SomeClass" , " --arg" , " arg1" , " --arg" , " arg2" ,
98
98
" --driver-memory" , " 4g" )
99
99
val appArgs = new SparkSubmitArguments (clArgs)
@@ -107,7 +107,7 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
107
107
108
108
test(" handles mesos client mode" ) {
109
109
val clArgs = Array (" thejar.jar" , " --deploy-mode" , " client" ,
110
- " --master" , " mesos://h:p" , " --executor-memory" , " 5g" , " --executor-cores" , " 5" ,
110
+ " --master" , " mesos://h:p" , " --executor-memory" , " 5g" , " --total- executor-cores" , " 5" ,
111
111
" --class" , " org.SomeClass" , " --arg" , " arg1" , " --arg" , " arg2" ,
112
112
" --driver-memory" , " 4g" )
113
113
val appArgs = new SparkSubmitArguments (clArgs)
0 commit comments