apoorvmittal10 commented on code in PR #17168:
URL: https://github.com/apache/kafka/pull/17168#discussion_r1777732384


##########
server/src/main/java/org/apache/kafka/server/metrics/ClientMetricsConfigs.java:
##########
@@ -133,8 +134,8 @@ private static void validateProperties(Properties 
properties) {
 
         // Make sure that push interval is between 100ms and 1 hour.
         if (properties.containsKey(PUSH_INTERVAL_MS)) {
-            int pushIntervalMs = 
Integer.parseInt(properties.getProperty(PUSH_INTERVAL_MS));
-            if (pushIntervalMs < MIN_INTERVAL_MS || pushIntervalMs > 
MAX_INTERVAL_MS) {
+            Integer pushIntervalMs = (Integer) 
ConfigDef.parseType(PUSH_INTERVAL_MS, properties.getProperty(PUSH_INTERVAL_MS), 
Type.INT);
+            if (pushIntervalMs == null || pushIntervalMs < MIN_INTERVAL_MS || 
pushIntervalMs > MAX_INTERVAL_MS) {

Review Comment:
   Hmmm, what happens when we use `kafka-client-metrics.sh` tool to just update 
pattern or metrics i.e. pushIntervalMs is not updated? Then isn't 
pushIntervalMs not null?



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