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 Summary
Constructors Constructor Description KafkaOffsetMetricManager(Supplier<Map<org.apache.kafka.common.TopicPartition,OffsetManager>> offsetManagerSupplier, Supplier<org.apache.kafka.clients.admin.Admin> adminSupplier, TopologyContext topologyContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,KafkaOffsetTopicMetrics>
getTopicMetricsMap()
Map<org.apache.kafka.common.TopicPartition,KafkaOffsetPartitionMetrics>
getTopicPartitionMetricsMap()
void
registerMetricsForNewTopicPartitions(Set<org.apache.kafka.common.TopicPartition> newAssignment)
-
-
-
Constructor Detail
-
KafkaOffsetMetricManager
public KafkaOffsetMetricManager(Supplier<Map<org.apache.kafka.common.TopicPartition,OffsetManager>> offsetManagerSupplier, Supplier<org.apache.kafka.clients.admin.Admin> adminSupplier, TopologyContext topologyContext)
-
-
Method Detail
-
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()
-
-