fapaul commented on a change in pull request #16838:
URL: https://github.com/apache/flink/pull/16838#discussion_r689627872



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/KafkaPartitionSplitReader.java
##########
@@ -414,6 +433,40 @@ private void maybeRegisterKafkaConsumerMetrics(
         }
     }
 
+    private Supplier<Long> getBytesConsumedTotalSupplier(KafkaConsumer<?, ?> 
consumer) {

Review comment:
       Nit: You can directly return the `Optional<Supplier<Long>>` to replace 
the null return.

##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/KafkaPartitionSplitReader.java
##########
@@ -414,6 +433,40 @@ private void maybeRegisterKafkaConsumerMetrics(
         }
     }
 
+    private Supplier<Long> getBytesConsumedTotalSupplier(KafkaConsumer<?, ?> 
consumer) {
+        final String bytesConsumedTotalName = "bytes-consumed-total";

Review comment:
       Nit: extract constants for the metric name and the name of the metric 
group




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