fredia commented on code in PR #25884:
URL: https://github.com/apache/flink/pull/25884#discussion_r1908252144


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/fs/cache/BundledCacheLimitPolicy.java:
##########
@@ -54,6 +56,17 @@ public void release(long toReleaseSize) {
         policies.forEach(policy -> policy.release(toReleaseSize));
     }
 
+    @Override
+    public long usedBytes() {
+        return 
policies.stream().mapToLong(CacheLimitPolicy::usedBytes).max().getAsLong();
+    }
+
+    @Override
+    public void registerCustomizedMetrics(String prefix, MetricGroup 
metricGroup) {
+        metricGroup.gauge(prefix + ".usedBytes", () -> usedBytes());

Review Comment:
   👍 I moved this to the file cache.



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