Skip to content

Commit

Permalink
Code review comments fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tsliwowicz committed Oct 23, 2014
1 parent f48bce9 commit df9d98f
Showing 1 changed file with 7 additions and 8 deletions.
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

0 comments on commit df9d98f

Please sign in to comment.