Skip to content
Snippets Groups Projects
Commit 9c12de50 authored by Henry Saputra's avatar Henry Saputra Committed by Reynold Xin
Browse files

[SPARK-2500] Move the logInfo for registering BlockManager to...

[SPARK-2500] Move the logInfo for registering BlockManager to BlockManagerMasterActor.register method

PR for SPARK-2500

Move the logInfo call for BlockManager to BlockManagerMasterActor.register instead of BlockManagerInfo constructor.

Previously the loginfo call for registering the registering a BlockManager is happening in the BlockManagerInfo constructor. This kind of confusing because the code could call "new BlockManagerInfo" without actually registering a BlockManager and could confuse when reading the log files.

Author: Henry Saputra <henry.saputra@gmail.com>

Closes #1424 from hsaputra/move_registerblockmanager_log_to_registration_method and squashes the following commits:

3370b4a [Henry Saputra] Move the loginfo for BlockManager to BlockManagerMasterActor.register instead of BlockManagerInfo constructor.
parent 4576d80a
No related branches found
No related tags found
No related merge requests found
......@@ -336,6 +336,10 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
case None =>
blockManagerIdByExecutor(id.executorId) = id
}
logInfo("Registering block manager %s with %s RAM".format(
id.hostPort, Utils.bytesToString(maxMemSize)))
blockManagerInfo(id) =
new BlockManagerInfo(id, System.currentTimeMillis(), maxMemSize, slaveActor)
}
......@@ -432,9 +436,6 @@ private[spark] class BlockManagerInfo(
// Mapping from block id to its status.
private val _blocks = new JHashMap[BlockId, BlockStatus]
logInfo("Registering block manager %s with %s RAM".format(
blockManagerId.hostPort, Utils.bytesToString(maxMem)))
def getStatus(blockId: BlockId) = Option(_blocks.get(blockId))
def updateLastSeenMs() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment