mridulm commented on code in PR #38668:
URL: https://github.com/apache/spark/pull/38668#discussion_r1038739883


##########
core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:
##########
@@ -125,7 +126,10 @@ private[storage] class BlockManagerDecommissioner(
                   logDebug(s"Migrated sub-block $blockId")
                 }
               }
-              logInfo(s"Migrated $shuffleBlockInfo to $peer")
+              lazy val endTime = System.currentTimeMillis()
+              lazy val totalBlockSize = Utils.bytesToString(blocks.map(b => 
b._2.size()).sum)
+              logInfo(s"Migrated $shuffleBlockInfo (" +
+                s"size: $totalBlockSize) to $peer in ${endTime - startTime} 
ms")

Review Comment:
   Yes, but you can avoid all the `lazy val` code.



##########
core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:
##########
@@ -125,7 +126,10 @@ private[storage] class BlockManagerDecommissioner(
                   logDebug(s"Migrated sub-block $blockId")
                 }
               }
-              logInfo(s"Migrated $shuffleBlockInfo to $peer")
+              lazy val endTime = System.currentTimeMillis()
+              lazy val totalBlockSize = Utils.bytesToString(blocks.map(b => 
b._2.size()).sum)
+              logInfo(s"Migrated $shuffleBlockInfo (" +
+                s"size: $totalBlockSize) to $peer in ${endTime - startTime} 
ms")

Review Comment:
   Yes, but you can avoid all the `lazy val` code.
   It is not important though.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to