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

    https://github.com/apache/spark/pull/19881#discussion_r176727530
  
    --- 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 --
    
    ok


---

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

Reply via email to