leixm commented on code in PR #2630:
URL: https://github.com/apache/celeborn/pull/2630#discussion_r1680301482


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala:
##########
@@ -741,6 +748,31 @@ private[celeborn] class Worker(
       })
     }
 
+  private def removeAppResourceConsumption(applicationIds: JHashSet[String]): 
Unit = {
+    applicationIds.asScala.foreach { applicationId =>
+      removeResourceConsumptionGauge(
+        ResourceConsumptionSource.DISK_FILE_COUNT,
+        applicationId)
+      removeResourceConsumptionGauge(
+        ResourceConsumptionSource.DISK_BYTES_WRITTEN,
+        applicationId)
+      removeResourceConsumptionGauge(
+        ResourceConsumptionSource.HDFS_FILE_COUNT,
+        applicationId)
+      removeResourceConsumptionGauge(
+        ResourceConsumptionSource.HDFS_BYTES_WRITTEN,
+        applicationId)
+    }
+  }
+
+  private def removeResourceConsumptionGauge(
+      resourceConsumptionName: String,
+      applicationId: String): Unit = {
+    resourceConsumptionSource.removeGauge(
+      resourceConsumptionName,
+      Map(resourceConsumptionSource.applicationLabel -> applicationId))

Review Comment:
   Since CELEBORN-1485, removeGauge no longer supports subset labels, so this 
code will not remove gauge.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to