Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17683#discussion_r112382807
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala 
---
    @@ -516,19 +522,32 @@ private[spark] class BlockManagerInfo(
            * They can be both larger than 0, when a block is dropped from 
memory to disk.
            * Therefore, a safe way to set BlockStatus is to set its info in 
accurate modes. */
           var blockStatus: BlockStatus = null
    +
           if (storageLevel.useMemory) {
             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 (blockExists) {
    +          logInfo("Updated %s in memory on %s (current size: %s, original 
size %s, free: %s)".format(
    +            blockId, blockManagerId.hostPort, Utils.bytesToString(memSize),
    +            
Utils.bytesToString(originalMemSize),Utils.bytesToString(_remainingMem)))
    +        } else {
    +          logInfo("Added %s in memory on %s (size: %s, free: %s)".format(
    +            blockId, blockManagerId.hostPort, Utils.bytesToString(memSize),
    +            Utils.bytesToString(_remainingMem)))
    +        }
           }
           if (storageLevel.useDisk) {
             blockStatus = BlockStatus(storageLevel, memSize = 0, diskSize = 
diskSize)
             _blocks.put(blockId, blockStatus)
    -        logInfo("Added %s on disk on %s (size: %s)".format(
    -          blockId, blockManagerId.hostPort, Utils.bytesToString(diskSize)))
    +        if (blockExists) {
    +          logInfo("Updated %s on disk on %s (current size: %s, original 
size %s)".format(
    --- End diff --
    
    You are still not using string interpolation, please do


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to