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

    https://github.com/apache/spark/pull/16905#discussion_r100834970
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/Pool.scala ---
    @@ -37,25 +37,22 @@ private[spark] class Pool(
     
       val schedulableQueue = new ConcurrentLinkedQueue[Schedulable]
       val schedulableNameToSchedulable = new ConcurrentHashMap[String, 
Schedulable]
    -  var weight = initWeight
    -  var minShare = initMinShare
    +  val weight = initWeight
    +  val minShare = initMinShare
       var runningTasks = 0
    -  var priority = 0
    +  val priority = 0
     
       // A pool's stage id is used to break the tie in scheduling.
       var stageId = -1
    -  var name = poolName
    +  val name = poolName
       var parent: Pool = null
     
    -  var taskSetSchedulingAlgorithm: SchedulingAlgorithm = {
    +  private val taskSetSchedulingAlgorithm: SchedulingAlgorithm = {
         schedulingMode match {
    -      case SchedulingMode.FAIR =>
    -        new FairSchedulingAlgorithm()
    -      case SchedulingMode.FIFO =>
    -        new FIFOSchedulingAlgorithm()
    -      case _ =>
    -        val msg = "Unsupported scheduling mode: $schedulingMode. Use FAIR 
or FIFO instead."
    -        throw new IllegalArgumentException(msg)
    +      case SchedulingMode.FAIR => new FairSchedulingAlgorithm()
    +      case SchedulingMode.FIFO => new FIFOSchedulingAlgorithm()
    +      case _ => throw new IllegalArgumentException("Unsupported scheduling 
mode: " +
    +        s"$schedulingMode. Supported modes: ${SchedulingMode.FAIR} or 
${SchedulingMode.FIFO}.")
    --- End diff --
    
    I'd really rather not see this kind of change. Other that the missing 
string-interpolation `s` in `msg`, the prior code was at least as good (and 
arguably better) than the new style, and making such an inconsequential style 
change just adds complication to future investigations of the git history.


---
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