You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tgravescs <gi...@git.apache.org> on 2018/03/21 20:36:03 UTC

[GitHub] spark pull request #19881: [SPARK-22683][CORE] Add a fullExecutorAllocationD...

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

    https://github.com/apache/spark/pull/19881#discussion_r176229298
  
    --- Diff: core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala ---
    @@ -145,6 +145,39 @@ class ExecutorAllocationManagerSuite
         assert(numExecutorsToAdd(manager) === 1)
       }
     
    +  def testParallelismDivisor(cores: Int, divisor: Double, expected: Int): Unit = {
    +    val conf = new SparkConf()
    +      .setMaster("myDummyLocalExternalClusterManager")
    +      .setAppName("test-executor-allocation-manager")
    +      .set("spark.dynamicAllocation.enabled", "true")
    +      .set("spark.dynamicAllocation.testing", "true")
    +      .set("spark.dynamicAllocation.maxExecutors", "15")
    +      .set("spark.dynamicAllocation.minExecutors", "3")
    +      .set("spark.dynamicAllocation.fullExecutorAllocationDivisor", divisor.toString)
    +      .set("spark.executor.cores", cores.toString)
    +    val sc = new SparkContext(conf)
    +    contexts += sc
    +    var manager = sc.executorAllocationManager.get
    +    post(sc.listenerBus, SparkListenerStageSubmitted(createStageInfo(0, 20)))
    +    for (i <- 0 to 5) {
    +      addExecutors(manager)
    --- End diff --
    
    this loop isn't really needed right? All we are checking is the target not the number to add?


---

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