yaoliclshlmch commented on code in PR #18761:
URL: https://github.com/apache/hudi/pull/18761#discussion_r3277824531


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/metrics/FlinkIndexBackendMetrics.java:
##########
@@ -63,6 +76,22 @@ public void registerMetrics() {
     metricGroup.histogram("remoteIndexLookupLatency", 
remoteIndexLookupLatency);
     metricGroup.histogram("localLookupKeysNum", localLookupKeysNum);
     metricGroup.histogram("remoteLookupKeysNum", remoteLookupKeysNum);
+    metricGroup.counter(BUCKET_ASSIGN_MINIBATCH_CACHE_HIT_COUNT, 
cacheHitCount);
+    metricGroup.counter(BUCKET_ASSIGN_MINIBATCH_CACHE_MISS_COUNT, 
cacheMissCount);
+  }
+
+  public void markCacheHit(long n) {

Review Comment:
   yeah we can emit cache hit ratio directly, but we will only get the ratio 
number per mini batch. keeping the cache hit / miss count can give us the 
flexibility of querying the ratio at any time range. wdyt?



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