Skip to content

Commit 812c33c

Browse files
committed
Fix driver lost --num-executors option in yarn-cluster mode
1 parent e7b6272 commit 812c33c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
164164

165165
private def startUserClass(): Thread = {
166166
logInfo("Starting the user JAR in a separate Thread")
167+
System.setProperty("spark.executor.instances",args.numExecutors.toString)
167168
val mainMethod = Class.forName(
168169
args.userClass,
169170
false,

0 commit comments

Comments
 (0)