spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markhamstra <>
Subject [GitHub] spark pull request #16905: [SPARK-19567][CORE][SCHEDULER] Support some Sched...
Date Mon, 13 Feb 2017 16:36:29 GMT
Github user markhamstra commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -130,15 +130,17 @@ private[spark] class TaskSchedulerImpl private[scheduler](
       val mapOutputTracker = SparkEnv.get.mapOutputTracker
    -  var schedulableBuilder: SchedulableBuilder = null
    +  private val SCHEDULER_MODE_PROPERTY = "spark.scheduler.mode"
    +  private var schedulableBuilder: SchedulableBuilder = null
       var rootPool: Pool = null
       // default scheduler is FIFO
    -  private val schedulingModeConf = conf.get("spark.scheduler.mode", "FIFO")
    +  private val schedulingModeConf = conf.get(SCHEDULER_MODE_PROPERTY, SchedulingMode.FIFO.toString)
       val schedulingMode: SchedulingMode = try {
       } catch {
         case e: java.util.NoSuchElementException =>
    -      throw new SparkException(s"Unrecognized spark.scheduler.mode: $schedulingModeConf")
    +      throw new SparkException(s"Unrecognized $SCHEDULER_MODE_PROPERTY: $schedulingModeConf.
" +
    +        s"Supported modes: ${SchedulingMode.FAIR} or ${SchedulingMode.FIFO}.")
    --- End diff --
    We're not likely to add or remove SchedulingModes with any frequency, if at all, so this
isn't likely to cause much opportunity for error -- but I agree with the principle that extracting
from `.values` is a better approach. 

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message