spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayousterhout <>
Subject [GitHub] spark pull request: [SPARK-2774] Set preferred locations for reduc...
Date Thu, 04 Jun 2015 21:19:05 GMT
Github user kayousterhout commented on a diff in the pull request:
    --- 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 --
    Also, what about changing this to something like "getMapLocationsWithBiggestOutputs",
and having it also accept the reduceId (and then return Option[Array[(BlockManagerId, Long)]],
since the caller always just takes one element out of the map? And then you can just add a
comment internally saying that you populate the whole map for use later.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message