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

    https://github.com/apache/spark/pull/1528#discussion_r15270239
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSet.scala ---
    @@ -27,9 +27,18 @@ private[spark] class TaskSet(
         val tasks: Array[Task[_]],
         val stageId: Int,
         val attempt: Int,
    -    val priority: Int,
    +    val jobId: Int,
         val properties: Properties) {
         val id: String = stageId + "." + attempt
    +    val DEFAULT_PRIORITY: Int = 0
    +
    +  def priority:Int = {
    +    if(properties != null){
    +      properties.getProperty("spark.scheduler.priority", "0").toInt
    +    }else{
    +      DEFAULT_PRIORITY
    +    }
    +  }
    --- End diff --
    
    Why the change from `val` to `def`?  I believe `val priority = if ... else 
...` will work fine here.


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

Reply via email to