Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/2480#discussion_r159063661
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
---
@@ -739,4 +764,9 @@ public boolean shouldPoll() {
return !this.pollablePartitions.isEmpty();
}
}
+
+ @VisibleForTesting
+ KafkaOffsetMetric getKafkaOffsetMetric() {
--- End diff --
Optional: We could avoid this getter by using the same trick with a factory
as we use for injecting the KafkaConsumer. If we add a KafkaOffsetMetricFactory
to the spout constructor, you can create the metric in the test and pass it
into the spout instead of letting the spout construct the metric.
---