Github user markhamstra commented on a diff in the pull request: https://github.com/apache/spark/pull/1528#discussion_r15272274 --- 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 + + val priority:Int = { + if(properties != null){ + properties.getProperty("spark.scheduler.priority", "0").toInt + }else{ + DEFAULT_PRIORITY + } + } --- End diff -- Is the style checker ok with `val priority = if (...) {...` instead of `val priority = { if (...) {...`? If it is, I'd rather do without the extra `{}`. You can also drop the `: Int` from `val DEFAULT_PRIORITY` and `val priority` -- the types are obvious without the annotations. Also, I'm not sure that DEFAULT_PRIORITY really gains you anything -- I'd be fine with just `if (...) {...} else 0`. And make sure you follow the style guide for spacing with parens and braces.
--- 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. ---