Skip to content

Commit 242166b

Browse files
modified accroding to the comments
1 parent d4b929b commit 242166b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,21 +352,20 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
352352
diskSize: Long,
353353
tachyonSize: Long): Boolean = {
354354

355-
var updated = true
356355
if (!blockManagerInfo.contains(blockManagerId)) {
357356
if (blockManagerId.isDriver && !isLocal) {
358357
// We intentionally do not register the master (except in local mode),
359358
// so we should not indicate failure.
360-
// do nothing here, "updated == true".
359+
return true
361360
} else {
362-
updated = false
361+
return false
363362
}
364-
return updated
363+
return true
365364
}
366365

367366
if (blockId == null) {
368367
blockManagerInfo(blockManagerId).updateLastSeenMs()
369-
return updated
368+
return true
370369
}
371370

372371
blockManagerInfo(blockManagerId).updateBlockInfo(
@@ -390,7 +389,7 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
390389
if (locations.size == 0) {
391390
blockLocations.remove(blockId)
392391
}
393-
updated
392+
true
394393
}
395394

396395
private def getLocations(blockId: BlockId): Seq[BlockManagerId] = {

0 commit comments

Comments
 (0)