Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/6352#discussion_r30948479
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -191,6 +191,11 @@ class DAGScheduler(
private[scheduler]
def getCacheLocs(rdd: RDD[_]): Seq[Seq[TaskLocation]] =
cacheLocs.synchronized {
+ // Note: if the storage level is NONE, we don't need to get locations
from block manager.
+ if (rdd.getStorageLevel == StorageLevel.NONE) {
+ return Seq.fill(rdd.partitions.size)(Nil)
--- End diff --
As a general style note, I'd try to avoid using `return` in Scala code,
since there are some corner-cases where using it can lead to exception-handling
issues (plus it results in slightly inefficient code which uses exceptions for
control flow).
---
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]