Skip to content

Commit 7e32341

Browse files
committed
Return faster with shuffle blocks since we don't need the rest of the logic in update block :)
1 parent 7f93df6 commit 7e32341

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,14 @@ class BlockManagerMasterEndpoint(
499499
case ShuffleIndexBlockId(shuffleId, mapId, _) =>
500500
// Don't update the map output on just the index block
501501
logDebug("Received shuffle index block update for ${shuffleId} ${mapId}")
502+
return true
502503
case ShuffleDataBlockId(shuffleId: Int, mapId: Long, reduceId: Int) =>
503504
logInfo("Received shuffle data block update for ${shuffleId} ${mapId}, performing update")
504505
mapOutputTracker.updateMapOutput(shuffleId, mapId, blockManagerId)
506+
return true
505507
case _ =>
506508
logDebug(s"Unexpected shuffle block type ${blockId}")
509+
return false
507510
}
508511
}
509512

0 commit comments

Comments
 (0)