Github user shivaram commented on the pull request:
https://github.com/apache/spark/pull/8280#issuecomment-132345128
The diff I'm proposing is something like
```
+ val numShuffleDeps =
rdd.dependencies.filter(_.isInstanceOf[ShuffleDependency[_, _, _]]).length
+
// If the RDD has shuffle dependencies and shuffle locality is
enabled, pick locations that
// have at least REDUCER_PREF_LOCS_FRACTION of data as preferred
locations
- if (shuffleLocalityEnabled && rdd.partitions.length <
SHUFFLE_PREF_REDUCE_THRESHOLD) {
+ if (numShuffleDeps == 1 && shuffleLocalityEnabled &&
+ rdd.partitions.length < SHUFFLE_PREF_REDUCE_THRESHOLD) {
```
---
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]