public class KafkaOffsetMetric<K,V> extends Object implements IMetric
This class is used compute the partition and topic level offset metrics
Partition level metrics are: topicName/partition{number}/earliestTimeOffset //gives beginning offset of the partition topicName/partition{number}/latestTimeOffset //gives end offset of the partition topicName/partition{number}/latestEmittedOffset //gives latest emitted offset of the partition from the spout topicName/partition{number}/latestCompletedOffset //gives latest committed offset of the partition from the spout topicName/partition{number}/spoutLag // the delta between the latest Offset and latestCompletedOffset topicName/partition{number}/recordsInPartition // total number of records in the partition
Topic level metrics are: topicName/totalEarliestTimeOffset //gives the total beginning offset of all the associated partitions of this spout topicName/totalLatestTimeOffset //gives the total end offset of all the associated partitions of this spout topicName/totalLatestEmittedOffset //gives the total latest emitted offset of all the associated partitions of this spout topicName/totalLatestCompletedOffset //gives the total latest committed offset of all the associated partitions of this spout topicName/spoutLag // total spout lag of all the associated partitions of this spout topicName/totalRecordsInPartitions //total number of records in all the associated partitions of this spout
Constructor and Description |
---|
KafkaOffsetMetric(com.google.common.base.Supplier offsetManagerSupplier,
com.google.common.base.Supplier consumerSupplier) |
public KafkaOffsetMetric(com.google.common.base.Supplier offsetManagerSupplier, com.google.common.base.Supplier consumerSupplier)
public Object getValueAndReset()
getValueAndReset
in interface IMetric
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.