Skip to content

Commit edb989d

Browse files
committed
Refine code style and comments position
1 parent 55fa4ba commit edb989d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,15 +1010,14 @@ private[spark] class BlockManager(
10101010
info.synchronized {
10111011
// required ? As of now, this will be invoked only for blocks which are ready
10121012
// But in case this changes in future, adding for consistency sake.
1013-
if (blockInfo.get(blockId).isEmpty) {
1014-
logWarning(s"Block $blockId was already dropped.")
1015-
return None
1016-
} else if(!info.waitForReady()) {
1013+
if (!info.waitForReady()) {
10171014
// If we get here, the block write failed.
10181015
logWarning(s"Block $blockId was marked as failure. Nothing to drop")
10191016
return None
1017+
} else if (blockInfo.get(blockId).isEmpty) {
1018+
logWarning(s"Block $blockId was already dropped.")
1019+
return None
10201020
}
1021-
10221021
var blockIsUpdated = false
10231022
val level = info.level
10241023

0 commit comments

Comments
 (0)