Github user aarondav commented on a diff in the pull request:
https://github.com/apache/spark/pull/762#discussion_r12621213
--- Diff: core/src/main/scala/org/apache/spark/scheduler/Pool.scala ---
@@ -60,21 +59,21 @@ private[spark] class Pool(
}
override def addSchedulable(schedulable: Schedulable) {
- schedulableQueue += schedulable
- schedulableNameToSchedulable(schedulable.name) = schedulable
+ schedulableQueue.offer(schedulable)
--- End diff --
nit: Could we add a require(schedule != null) here? It would cause a NPE
anyway, I think this would just make it clearer. It also makes our use of
`Option(schedulableNameToSchedulable.get(...))` correct.
---
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.
---