bbejeck commented on code in PR #21617:
URL: https://github.com/apache/kafka/pull/21617#discussion_r2907507060


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/metrics/StateStoreMetrics.java:
##########
@@ -515,4 +519,20 @@ private static Sensor throughputAndLatencySensor(final 
String taskId,
         );
         return sensor;
     }
+
+    public static void addNumKeysGauge(final String taskId,
+                                          final String storeType,

Review Comment:
   nit: formatting



##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java:
##########
@@ -381,6 +381,13 @@ public void close() {
         open = false;
     }
 
+    long approximateNumEntries() {

Review Comment:
   why name this `approximateNumEntries` ? I thought for in-memory stores we'll 
get an actual count.



##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredWindowStore.java:
##########
@@ -158,6 +158,25 @@ private void registerMetrics() {
                 }
             }
         );
+        // Only register this metric if it is an in-memory store

Review Comment:
   same as above



##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredSessionStore.java:
##########
@@ -138,6 +138,25 @@ private void registerMetrics() {
                 }
             }
         );
+        // Only register this metric if it is an in-memory store

Review Comment:
   super nit: Not sure we need the comment the code is self-explainatory - I'll 
leave it to you



##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryWindowStore.java:
##########
@@ -403,6 +403,12 @@ public void close() {
         open = false;
     }
 
+    long approximateNumEntries() {

Review Comment:
   same here



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