turboFei commented on code in PR #2891:
URL: https://github.com/apache/celeborn/pull/2891#discussion_r1833835019


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -261,8 +261,20 @@ private[celeborn] class Master(
       }).sum()
   }
 
+  masterSource.addGauge(MasterSource.SHUFFLE_TOTAL_COUNT) { () =>
+    statusSystem.shuffleTotalCount.sum()
+  }
+
   masterSource.addGauge(MasterSource.SHUFFLE_FALLBACK_COUNT) { () =>
-    statusSystem.shuffleTotalFallbackCount.sum()
+    statusSystem.shuffleFallbackCounts.values().asScala.map(_.longValue()).sum
+  }
+
+  statusSystem.shuffleFallbackCounts.entrySet().asScala.foreach { 
shuffleFallbackCount =>

Review Comment:
   seems we can register metrics on demand when add new key into the map



-- 
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