spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgravescs <...@git.apache.org>
Subject [GitHub] spark pull request #19881: [SPARK-22683][CORE] Add a fullExecutorAllocationD...
Date Wed, 21 Mar 2018 20:36:03 GMT
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


Mime
View raw message