Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/17683#discussion_r112183513
--- Diff:
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
---
@@ -520,8 +520,18 @@ private[spark] class BlockManagerInfo(
blockStatus = BlockStatus(storageLevel, memSize = memSize,
diskSize = 0)
_blocks.put(blockId, blockStatus)
_remainingMem -= memSize
- logInfo("Added %s in memory on %s (size: %s, free: %s)".format(
- blockId, blockManagerId.hostPort, Utils.bytesToString(memSize),
+ val originalMemSize = if (_blocks.containsKey(blockId)) {
--- End diff --
I see, it's not a Scala Map or else this could be `.getOrElse(..., 0)`. Now
I understand why you pulled out the variable earlier. I actually dont' think
this works now because it happens after the new status has been put in the Map.
OK, you could go back to what you had.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]