Re: [PR] KAFKA-18077: Remove deprecated JmxReporter(String) [kafka]

2024-11-25 Thread via GitHub


chia7712 merged PR #17923:
URL: https://github.com/apache/kafka/pull/17923


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



Re: [PR] KAFKA-18077: Remove deprecated JmxReporter(String) [kafka]

2024-11-24 Thread via GitHub


clarkwtc commented on code in PR #17923:
URL: https://github.com/apache/kafka/pull/17923#discussion_r1855454837


##
clients/src/main/java/org/apache/kafka/common/metrics/JmxReporter.java:
##
@@ -69,20 +69,7 @@ public class JmxReporter implements MetricsReporter {
 private final Map mbeans = new HashMap<>();
 private Predicate mbeanPredicate = s -> true;
 
-public JmxReporter() {
-this("");
-}
-
-/**
- * Create a JMX reporter that prefixes all metrics with the given string.
- *  @deprecated Since 2.6.0. Use {@link JmxReporter#JmxReporter()}
- *  Initialize JmxReporter with {@link 
JmxReporter#contextChange(MetricsContext)}
- *  Populate prefix by adding _namespace/prefix key value pair to {@link 
MetricsContext}
- */
-@Deprecated
-public JmxReporter(String prefix) {
-this.prefix = prefix != null ? prefix : "";
-}
+public JmxReporter() {}

Review Comment:
   @chia7712 I got it; I missed initializing "prefix" to empty string, thanks.



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



Re: [PR] KAFKA-18077: Remove deprecated JmxReporter(String) [kafka]

2024-11-24 Thread via GitHub


chia7712 commented on code in PR #17923:
URL: https://github.com/apache/kafka/pull/17923#discussion_r1855436742


##
clients/src/main/java/org/apache/kafka/common/metrics/JmxReporter.java:
##
@@ -69,20 +69,7 @@ public class JmxReporter implements MetricsReporter {
 private final Map mbeans = new HashMap<>();
 private Predicate mbeanPredicate = s -> true;
 
-public JmxReporter() {
-this("");
-}
-
-/**
- * Create a JMX reporter that prefixes all metrics with the given string.
- *  @deprecated Since 2.6.0. Use {@link JmxReporter#JmxReporter()}
- *  Initialize JmxReporter with {@link 
JmxReporter#contextChange(MetricsContext)}
- *  Populate prefix by adding _namespace/prefix key value pair to {@link 
MetricsContext}
- */
-@Deprecated
-public JmxReporter(String prefix) {
-this.prefix = prefix != null ? prefix : "";
-}
+public JmxReporter() {}

Review Comment:
   Please initialize "prefix" to empty string and then remove this default 
constructor as well.



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



Re: [PR] KAFKA-18077: Remove deprecated JmxReporter(String) [kafka]

2024-11-23 Thread via GitHub


clarkwtc commented on PR #17923:
URL: https://github.com/apache/kafka/pull/17923#issuecomment-2495507962

   @chia7712 I have updated the `upgrade.html`, please review it.


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