dongjoon-hyun commented on a change in pull request #27418: [SPARK-30594][CORE]
Do not post SparkListenerBlockUpdated when updateBlockInfo returns false
URL: https://github.com/apache/spark/pull/27418#discussion_r373723884
##########
File path:
core/src/test/scala/org/apache/spark/status/AppStatusListenerSuite.scala
##########
@@ -1657,6 +1657,20 @@ class AppStatusListenerSuite extends SparkFunSuite with
BeforeAndAfter {
}
}
+ test("clean up used memory when BlockManager added") {
+ val listener = new AppStatusListener(store, conf, true)
+
+ val driver = BlockManagerId(SparkContext.DRIVER_IDENTIFIER, "localhost",
42)
+ listener.onBlockManagerAdded(SparkListenerBlockManagerAdded(
+ time, driver, 42L, Some(43L), Some(44L)))
+
+ check[ExecutorSummaryWrapper](SparkContext.DRIVER_IDENTIFIER) { d =>
+ val memoryMetrics = d.info.memoryMetrics.get
+ assert(memoryMetrics.usedOffHeapStorageMemory == 0)
+ assert(memoryMetrics.usedOnHeapStorageMemory == 0)
Review comment:
Thank you for adding this.
BTW, this fail without
`core/src/main/scala/org/apache/spark/status/AppStatusListener.scala`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]