Class KafkaOffsetMetricManager<K,V>

java.lang.Object
org.apache.storm.kafka.spout.metrics2.KafkaOffsetMetricManager<K,V>

public class KafkaOffsetMetricManager<K,V> extends Object
This class is used to manage both the partition and topic level offset metrics.
  • 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

      public Map<String,KafkaOffsetTopicMetrics> getTopicMetricsMap()