Class KafkaOffsetMetricManager<K,V>
java.lang.Object
org.apache.storm.kafka.spout.metrics2.KafkaOffsetMetricManager<K,V>
This class is used to manage both the partition and topic level offset metrics.
-
Constructor Summary
ConstructorDescriptionKafkaOffsetMetricManager
(Supplier<Map<org.apache.kafka.common.TopicPartition, OffsetManager>> offsetManagerSupplier, Supplier<org.apache.kafka.clients.consumer.Consumer<K, V>> consumerSupplier, TopologyContext topologyContext) -
Method Summary
Modifier and TypeMethodDescriptionMap<org.apache.kafka.common.TopicPartition,
KafkaOffsetPartitionMetrics> void
registerMetricsForNewTopicPartitions
(Set<org.apache.kafka.common.TopicPartition> newAssignment)
-
Constructor Details
-
KafkaOffsetMetricManager
public KafkaOffsetMetricManager(Supplier<Map<org.apache.kafka.common.TopicPartition, OffsetManager>> offsetManagerSupplier, Supplier<org.apache.kafka.clients.consumer.Consumer<K, V>> consumerSupplier, TopologyContext topologyContext)
-
-
Method Details
-
registerMetricsForNewTopicPartitions
public void registerMetricsForNewTopicPartitions(Set<org.apache.kafka.common.TopicPartition> newAssignment) -
getTopicPartitionMetricsMap
public Map<org.apache.kafka.common.TopicPartition,KafkaOffsetPartitionMetrics> getTopicPartitionMetricsMap() -
getTopicMetricsMap
-