diff options
author | Henry Saputra <henry.saputra@gmail.com> | 2014-07-15 21:21:52 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-07-15 21:21:52 -0700 |
commit | 9c12de5092312319aa22f24df47a6de0e41a0102 (patch) | |
tree | ad6f911e6aadb694f61419734f269043a7d6ee6a /core | |
parent | 4576d80a5155c9fbfebe9c36cca06c208bca5bd3 (diff) | |
download | spark-9c12de5092312319aa22f24df47a6de0e41a0102.tar.gz spark-9c12de5092312319aa22f24df47a6de0e41a0102.tar.bz2 spark-9c12de5092312319aa22f24df47a6de0e41a0102.zip |
[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.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala b/core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala index 6aed322eeb..de1cc5539f 100644 --- a/core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala +++ b/core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala @@ -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() { |