mimaison commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1521121701
##########
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##########
@@ -28,7 +59,14 @@ public final class KafkaMetric implements Metric {
private final MetricValueProvider<?> metricValueProvider;
private MetricConfig config;
- // public for testing
Review Comment:
Let's not remove this comment. It's useful to indicate why this constructor
is not private.
##########
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##########
@@ -20,6 +20,37 @@
import org.apache.kafka.common.MetricName;
import org.apache.kafka.common.utils.Time;
+/**
+ * An implementation of {@link Metric} interface.
+ * <p>
+ * A KafkaMetric is a named metric for monitoring purpose. The metric value
can be a {@link Measurable} or a {@link Gauge}.
+ * <pre>
+ * <b>metricName</b> The name of the metric
+ * <b>lock</b> A lock used for reading the metric value in case of race
condition
+ * <b>time</b> The POSIX time in milliseconds the metric is being taken
+ * <b>metricValueProvider</b> The metric collecting implementation that
implements {@link MetricValueProvider}
+ * <b>config</b> The metric configuration which is a {@link MetricConfig}
+ * </pre>
Review Comment:
Yeah since we don't expect users to create KafkaMetric objects I don't think
we need this.
--
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]