Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code review comments fixed
  • Loading branch information
tsliwowicz committed Oct 23, 2014
commit df9d98fe6703f6cc37fb0187fa55d140f37bb50e
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
blockManagerIdByExecutor -= blockManagerId.executorId

// Remove it from blockManagerInfo and remove all the blocks.
blockManagerInfo.remove(blockManagerId)

blockManagerInfo.remove(blockManagerId)
val iterator = info.blocks.keySet.iterator
while (iterator.hasNext) {
val blockId = iterator.next
Expand All @@ -202,7 +201,7 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
}
}
listenerBus.post(SparkListenerBlockManagerRemoved(System.currentTimeMillis(), blockManagerId))
logInfo("removed " + blockManagerId)
logInfo(s"Removing block manager $blockManagerId")
}

private def expireDeadHosts() {
Expand Down Expand Up @@ -328,10 +327,10 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus

if (!blockManagerInfo.contains(id)) {
blockManagerIdByExecutor.get(id.executorId) match {
case Some(manager) =>
// A block manager of the same executor already exists so remove it (assumed dead).
case Some(oldId) =>
// already exists so remove it (assumed dead).
logError("Got two different block manager registrations on same executor - "
+ " will remove, new Id " + id + ", orig id - " + manager)
+ " will remove, new Id %s, orig id - %s".format(id, oldId))
removeExecutor(id.executorId)
case None =>
}
Expand All @@ -340,8 +339,8 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus

blockManagerIdByExecutor(id.executorId) = id

blockManagerInfo(id) = new BlockManagerInfo(id, System.currentTimeMillis(),
maxMemSize, slaveActor)
blockManagerInfo(id) = new BlockManagerInfo(
id, System.currentTimeMillis(), maxMemSize, slaveActor)
}
listenerBus.post(SparkListenerBlockManagerAdded(time, id, maxMemSize))
}
Expand Down