public class ConsumerMetricsBuilder
extends java.lang.Object
ConsumerMetric
instance.ConsumerMetricPerClientId
which gives a result value related to metric
associated to the clientId.
ConsumerMetricPerClientIdAndTopics
which gives a result value related
to metric associated to the clientId and a specific topic.
ConsumerMetricPerClientIdAndTopicPartitions
which gives a
result value related to metric associated to the clientId and a specific topic and partition.
Modifier and Type | Method and Description |
---|---|
static ConsumerMetricPerClientId |
buildClientMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics,
java.lang.String metricAttributeName,
java.lang.String clientId)
This method builds an instance of a
ConsumerMetricPerClientId which gives a result value related to
metric associated to the clientId. |
static ConsumerMetricPerClientIdAndTopics |
buildClientTopicMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics,
java.lang.String metricAttributeName,
java.lang.String clientId,
java.util.List<TopicPartition> topics)
This method builds an instance of a
ConsumerMetricPerClientIdAndTopics which gives a resultvalue
related to metric associated to an specific topic provided as a parameter associated to the clientId. |
static ConsumerMetricPerClientIdAndTopicPartitions |
buildClientTopicPartitionMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics,
java.lang.String metricAttributeName,
java.lang.String clientId,
java.util.List<TopicPartition> topicPartitions)
This method builds an instance of a
ConsumerMetricPerClientIdAndTopicPartitions which gives a
result value related to metric associated to an specific topic-partition provided as a parameter associated to
the clientId. |
public static ConsumerMetricPerClientId buildClientMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics, java.lang.String metricAttributeName, java.lang.String clientId)
ConsumerMetricPerClientId
which gives a result value related to
metric associated to the clientId.metrics
- The Kafka list metrics.metricAttributeName
- The name of the Kafka metric that will be measured.clientId
- The clientId associated to the consumer.ConsumerMetricPerClientId
instance.public static ConsumerMetricPerClientIdAndTopics buildClientTopicMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics, java.lang.String metricAttributeName, java.lang.String clientId, java.util.List<TopicPartition> topics)
ConsumerMetricPerClientIdAndTopics
which gives a resultvalue
related to metric associated to an specific topic provided as a parameter associated to the clientId.metrics
- The Kafka list metrics.metricAttributeName
- The name of the Kafka metric that will be measured.clientId
- The clientId associated to the consumer.topics
- The topicPartition which contains the topic name.ConsumerMetricPerClientIdAndTopics
instance.public static ConsumerMetricPerClientIdAndTopicPartitions buildClientTopicPartitionMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics, java.lang.String metricAttributeName, java.lang.String clientId, java.util.List<TopicPartition> topicPartitions)
ConsumerMetricPerClientIdAndTopicPartitions
which gives a
result value related to metric associated to an specific topic-partition provided as a parameter associated to
the clientId.metrics
- The Kafka list metrics.metricAttributeName
- The name of the Kafka metric that will be measured.clientId
- The clientId associated to the consumer.topicPartitions
- The topicPartitions which contains the topic-partition asociated.ConsumerMetricPerClientIdAndTopics
instance.