LuciferYang commented on a change in pull request #25309: 
[SPARK-28577][YARN]Resource capability requested for each executor add 
offHeapMemorySize 
URL: https://github.com/apache/spark/pull/25309#discussion_r317533215
 
 

 ##########
 File path: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
 ##########
 @@ -346,12 +348,14 @@ private[spark] class Client(
     val maxMem = newAppResponse.getMaximumResourceCapability().getMemory()
     logInfo("Verifying our application has not requested more than the maximum 
" +
       s"memory capability of the cluster ($maxMem MB per container)")
-    val executorMem = executorMemory + executorMemoryOverhead + 
pysparkWorkerMemory
+    val executorMem =
+      executorMemory + executorOffHeapMemory + executorMemoryOverhead + 
pysparkWorkerMemory
     if (executorMem > maxMem) {
-      throw new IllegalArgumentException(s"Required executor memory 
($executorMemory), overhead " +
-        s"($executorMemoryOverhead MB), and PySpark memory 
($pysparkWorkerMemory MB) is above " +
-        s"the max threshold ($maxMem MB) of this cluster! Please check the 
values of " +
-        s"'yarn.scheduler.maximum-allocation-mb' and/or 
'yarn.nodemanager.resource.memory-mb'.")
+      throw new IllegalArgumentException(s"Required executor memory 
($executorMemory MB), " +
+        s"offHeap memory ($executorOffHeapMemory) MB, overhead 
($executorMemoryOverhead MB), " +
+        s"and PySpark memory ($pysparkWorkerMemory MB) is above the max 
threshold ($maxMem MB) " +
+        s"of this cluster! Please check the values of 
'yarn.scheduler.maximum-allocation-mb' " +
+        s"and/or 'yarn.nodemanager.resource.memory-mb'.")
 
 Review comment:
   
[02c0f2a](https://github.com/apache/spark/pull/25309/commits/02c0f2a5ff188181b15d4f4f221f9a48608cca13)
 fix this

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to