Naireen commented on code in PR #34244:
URL: https://github.com/apache/beam/pull/34244#discussion_r1989856171
##########
sdks/java/io/kafka/src/test/java/org/apache/beam/sdk/io/kafka/KafkaMetricsTest.java:
##########
@@ -73,11 +73,10 @@ public TestMetricsContainer() {
}
@Override
- public TestHistogramCell getPerWorkerHistogram(
+ public TestHistogramCell getHistogram(
MetricName metricName, HistogramData.BucketType bucketType) {
- perWorkerHistograms.computeIfAbsent(
- KV.of(metricName, bucketType), kv -> new TestHistogramCell(kv));
- return perWorkerHistograms.get(KV.of(metricName, bucketType));
+ histograms.computeIfAbsent(KV.of(metricName, bucketType), kv -> new
TestHistogramCell(kv));
Review Comment:
Thanks for catching that, add it in the KafkaSinkMetricsTest.java file
instead.
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaSinkMetrics.java:
##########
@@ -72,9 +72,10 @@ public static Histogram createRPCLatencyHistogram(RpcMethod
method, String topic
nameBuilder.addLabel(TOPIC_LABEL, topic);
MetricName metricName = nameBuilder.build(METRICS_NAMESPACE);
- HistogramData.BucketType buckets = HistogramData.ExponentialBuckets.of(1,
17);
+
nameBuilder.addMetricLabel(MonitoringInfoConstants.Labels.PER_WORKER_METRIC,
"true");
Review Comment:
Done.
--
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]