Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3607#discussion_r22065568
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -39,23 +39,37 @@ private[spark] class ClientArguments(args: 
Array[String], sparkConf: SparkConf)
       var appName: String = "Spark"
       var priority = 0
     
    -  // Additional memory to allocate to containers
    -  // For now, use driver's memory overhead as our AM container's memory 
overhead
    -  val amMemoryOverhead = 
sparkConf.getInt("spark.yarn.driver.memoryOverhead",
    -    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))
    -
       private val isDynamicAllocationEnabled =
         sparkConf.getBoolean("spark.dynamicAllocation.enabled", false)
     
       parseArgs(args.toList)
    +
    +  val isClusterMode = userClass != null
    +
       loadEnvironmentArgs()
       validateArgs()
    --- End diff --
    
    minor point, but when I refactored this I made sure to keep these three 
things (parseArgs ... validateArgs) right after each other so it's easy to 
follow what the order is. I would move `val isClusterMode` after `validateArgs`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to