cmccabe commented on code in PR #14010:
URL: https://github.com/apache/kafka/pull/14010#discussion_r1268716163


##########
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java:
##########
@@ -54,6 +54,14 @@ public class QuorumControllerMetrics implements 
AutoCloseable {
         "KafkaController", "LastAppliedRecordTimestamp");
     private final static MetricName LAST_APPLIED_RECORD_LAG_MS = getMetricName(
         "KafkaController", "LastAppliedRecordLagMs");

Review Comment:
   I'd prefer it this way since we're initializing a bunch of constants here, 
and sometimes we want to grep for stuff.
   
   It's kind of annoying when you have "matryoshka doll initialization" of 
constants.
   
   Like rather than having:
   ```
   static final String FOO = "foo";
   static final String BAR = "bar";
   static final String FOO_BAR = FOO + BAR;
   static final String FOO_BAR_BAZ = FOO_BAR + "baz";
   ```
   
   I'd rather just have:
   ```
   static final String FOO = "foo";
   static final String BAR = "bar";
   static final String FOO_BAR = "foobar";
   static final String FOO_BAR_BAZ = "foobarbaz";
   ```
   
   since then I can grep for the constant and it works as expected.
   
   Although maybe other people disagree?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to