Github user shivaram commented on a diff in the pull request:
https://github.com/apache/spark/pull/6652#discussion_r31775420
--- Diff: core/src/main/scala/org/apache/spark/MapOutputTracker.scala ---
@@ -284,6 +291,32 @@ private[spark] class MapOutputTrackerMaster(conf:
SparkConf)
cachedSerializedStatuses.contains(shuffleId) ||
mapStatuses.contains(shuffleId)
}
+ // Return the list of locations and blockSizes for each reducer.
+ // The map is keyed by reducerId and for each reducer the value contains
the array
+ // of (location, size) of map outputs.
+ //
+ // This method is not thread-safe
+ def getStatusByReducer(
+ shuffleId: Int,
+ numReducers: Int)
--- End diff --
I've moved the `takeOrdered` to MapOutputTracker now. Unfortunately some of
the savings in constructing the array can't be done as we need the groupBy here
(for the comment below).
Also I'm hoping the `groupBy` is not expensive if we have say a 1000
elements in the array.
@JoshRosen let me know if there is a better way to do this.
---
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]