Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3794#discussion_r23434730
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -495,6 +495,19 @@ class DAGScheduler(
assert(partitions.size > 0)
val func2 = func.asInstanceOf[(TaskContext, Iterator[_]) => _]
val waiter = new JobWaiter(this, jobId, partitions.size, resultHandler)
+
+ // Makes sure that getPartitions occurs before
+ // the job submitter sends a message into the DAGScheduler actor.
--- End diff --
I'd expand this comment to explain that the reason for performing this call
here is that computing the partitions may be very expensive for certain types
of RDDs (e.g. HadoopRDDs), so therefore we'd like that computation to take
place outside of the DAGScheduler to avoid blocking its event processing loop.
I'd also mention SPARK-4961 so that it's easier to find more context on JIRA.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]