Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/6607#discussion_r31785028
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala
---
@@ -308,12 +305,41 @@ class ReceiverTracker(ssc: StreamingContext,
skipReceiverLaunch: Boolean = false
supervisor.start()
supervisor.awaitTermination()
}
+
// Run the dummy Spark job to ensure that all slaves have registered.
// This avoids all the receivers to be scheduled on the same node.
if (!ssc.sparkContext.isLocal) {
ssc.sparkContext.makeRDD(1 to 50, 50).map(x => (x,
1)).reduceByKey(_ + _, 20).collect()
}
+ // Right now, we only honor preferences if all receivers have them
+ val hasLocationPreferences =
receivers.map(_.preferredLocation.isDefined).reduce(_ && _)
--- End diff --
Would be nice if this new functionality is put into a function by itself.
So that we can unit test it individually to test against different combinations
of executors and all, may be different policies in the future.
---
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]