Skip to content

Commit 34d0283

Browse files
committed
Fix style issues
1 parent 3b464b7 commit 34d0283

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

core/src/main/scala/org/apache/spark/MapOutputTracker.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ private[spark] class MapOutputTrackerMaster(conf: SparkConf)
301301
// of (location, size) of map outputs.
302302
//
303303
// This method is not thread-safe
304-
def getStatusByReducer(shuffleId: Int, numReducers: Int): Option[Map[Int, Array[(BlockManagerId, Long)]]] = {
304+
def getStatusByReducer(
305+
shuffleId: Int,
306+
numReducers: Int)
307+
: Option[Map[Int, Array[(BlockManagerId, Long)]]] = {
305308
if (!statusByReducer.contains(shuffleId) && mapStatuses.contains(shuffleId)) {
306309
val statuses = mapStatuses(shuffleId)
307310
if (statuses.length > 0) {

core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,8 +1339,9 @@ class DAGScheduler(
13391339
// Get the map output locations for this reducer
13401340
if (status.contains(partition)) {
13411341
// Select first few locations as preferred locations for the reducer
1342-
val topLocs = CollectionUtils.takeOrdered(status(partition).iterator,
1343-
NUM_REDUCER_PREF_LOCS)(Ordering.by[(BlockManagerId, Long), Long](_._2).reverse).toSeq
1342+
val topLocs = CollectionUtils.takeOrdered(
1343+
status(partition).iterator, NUM_REDUCER_PREF_LOCS)
1344+
(Ordering.by[(BlockManagerId, Long), Long](_._2).reverse).toSeq
13441345
return topLocs.map(_._1).map(loc => TaskLocation(loc.host, loc.executorId))
13451346
}
13461347
}

0 commit comments

Comments
 (0)