Skip to content

Commit ffa7569

Browse files
committed
review commit
1 parent 5c9581f commit ffa7569

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,21 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp
9393
appAttemptId = getApplicationAttemptId()
9494
resourceManager = registerWithResourceManager()
9595

96-
// // do not override - hits https://issues.apache.org/jira/browse/HADOOP-8406
97-
// // TODO: Uncomment when hadoop is on a version which has this fixed.
98-
// val appMasterResponse: RegisterApplicationMasterResponse = registerApplicationMaster()
99-
// // Compute number of threads for akka
100-
// val minimumMemory = appMasterResponse.getMinimumResourceCapability().getMemory()
101-
// // Additional memory overhead - in mb.
102-
// val memoryOverhead = sparkConf.getInt("spark.yarn.container.memoryOverhead", 384)
103-
//
104-
// if (minimumMemory > 0) {
105-
// val mem = args.executorMemory + memoryOverhead
106-
// val numCore = (mem / minimumMemory) + (if (0 != (mem % minimumMemory)) 1 else 0)
107-
// if (numCore > 0) {
108-
// args.workerCores = numCore
109-
// }
110-
// }
96+
val appMasterResponse: RegisterApplicationMasterResponse = registerApplicationMaster()
97+
98+
// Compute number of threads for akka
99+
val minimumMemory = appMasterResponse.getMinimumResourceCapability().getMemory()
100+
101+
if (minimumMemory > 0) {
102+
val mem = args.executorMemory + sparkConf.getInt("spark.yarn.container.memoryOverhead", 384)
103+
val numCore = (mem / minimumMemory) + (if (0 != (mem % minimumMemory)) 1 else 0)
104+
105+
if (numCore > 0) {
106+
// do not override - hits https://issues.apache.org/jira/browse/HADOOP-8406
107+
// TODO: Uncomment when hadoop is on a version which has this fixed.
108+
// args.workerCores = numCore
109+
}
110+
}
111111

112112
waitForSparkMaster()
113113

0 commit comments

Comments
 (0)