Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/17683#discussion_r112167751
--- Diff:
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
---
@@ -520,9 +521,16 @@ 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),
- Utils.bytesToString(_remainingMem)))
+ if((memSize-originalMemSize) >= 0){
+ logInfo("Added %s in memory on %s (size: %s, free: %s)".format(
+ blockId, blockManagerId.hostPort,
Utils.bytesToString(memSize-originalMemSize),
+ Utils.bytesToString(_remainingMem)))
+ }
+ else{
--- End diff --
Lots of style problems in this change. Spaces are missing around operators,
else shouldn't be on a new line. Also go ahead and use interpolated string
style in the log message, and pull out some helper vars for clarity.
---
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]