Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaram committed Feb 12, 2015
1 parent 3b464b7 commit 34d0283
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion core/src/main/scala/org/apache/spark/MapOutputTracker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ private[spark] class MapOutputTrackerMaster(conf: SparkConf)
// of (location, size) of map outputs.
//
// This method is not thread-safe
def getStatusByReducer(shuffleId: Int, numReducers: Int): Option[Map[Int, Array[(BlockManagerId, Long)]]] = {
def getStatusByReducer(
shuffleId: Int,
numReducers: Int)
: Option[Map[Int, Array[(BlockManagerId, Long)]]] = {
if (!statusByReducer.contains(shuffleId) && mapStatuses.contains(shuffleId)) {
val statuses = mapStatuses(shuffleId)
if (statuses.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1339,8 +1339,9 @@ class DAGScheduler(
// Get the map output locations for this reducer
if (status.contains(partition)) {
// Select first few locations as preferred locations for the reducer
val topLocs = CollectionUtils.takeOrdered(status(partition).iterator,
NUM_REDUCER_PREF_LOCS)(Ordering.by[(BlockManagerId, Long), Long](_._2).reverse).toSeq
val topLocs = CollectionUtils.takeOrdered(
status(partition).iterator, NUM_REDUCER_PREF_LOCS)
(Ordering.by[(BlockManagerId, Long), Long](_._2).reverse).toSeq
return topLocs.map(_._1).map(loc => TaskLocation(loc.host, loc.executorId))
}
}
Expand Down

0 comments on commit 34d0283

Please sign in to comment.