AndrewJSchofield commented on code in PR #18826:
URL: https://github.com/apache/kafka/pull/18826#discussion_r1954533469
##########
server/src/main/java/org/apache/kafka/server/share/metrics/ShareGroupMetrics.java:
##########
@@ -82,7 +83,14 @@ public Histogram partitionLoadTimeMs() {
@Override
public void close() throws Exception {
Arrays.stream(AcknowledgeType.values()).forEach(
- m -> metricsGroup.removeMetric(RECORD_ACKNOWLEDGEMENTS_PER_SEC,
Map.of(ACK_TYPE, m.toString())));
+ m -> metricsGroup.removeMetric(RECORD_ACKNOWLEDGEMENTS_PER_SEC,
Map.of(ACK_TYPE_TAG, m.toString())));
metricsGroup.removeMetric(PARTITION_LOAD_TIME_MS);
}
+
+ private static String capitalize(String string) {
+ if (string == null || string.isEmpty()) {
+ return string;
+ }
+ return string.substring(0, 1).toUpperCase(Locale.ENGLISH) +
string.substring(1);
Review Comment:
We tend to use `Locale.ROOT` in Kafka for upper/lower-casing strings.
Indeed, `AcknowledgeType` uses `Locale.ROOT` so probably ought to be consistent.
--
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]