Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/3607#discussion_r21498649
--- Diff:
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala
---
@@ -54,8 +46,25 @@ private[spark] class ClientArguments(args:
Array[String], sparkConf: SparkConf)
loadEnvironmentArgs()
validateArgs()
+ // Additional memory to allocate to containers
+ // For now, use driver's memory overhead as our AM container's memory
overhead
+ val memOverheadStr = if (userClass == null) {
+ "spark.yarn.driver.memoryOverhead"
+ } else {
+ "spark.yarn.am.memoryOverhead"
+ }
+ val amMemoryOverhead = sparkConf.getInt(memOverheadStr,
+ math.max((MEMORY_OVERHEAD_FACTOR * amMemory).toInt,
MEMORY_OVERHEAD_MIN))
+
+ val executorMemoryOverhead =
sparkConf.getInt("spark.yarn.executor.memoryOverhead",
+ math.max((MEMORY_OVERHEAD_FACTOR * executorMemory).toInt,
MEMORY_OVERHEAD_MIN))
+
/** Load any default arguments provided through environment variables
and Spark properties. */
private def loadEnvironmentArgs(): Unit = {
+ // We use spark.yarn.am.memory to initialize Application Master in
yarn-client mode.
--- End diff --
We need to add a comment here:
```
// This does not apply to cluster mode because the driver and the AM live
in the same JVM in this mode
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]