public class BrokerLoad
extends java.lang.Object
Constructor and Description |
---|
BrokerLoad() |
Modifier and Type | Method and Description |
---|---|
double |
brokerMetric(RawMetricType rawMetricType) |
boolean |
brokerMetricAvailable(RawMetricType rawMetricType) |
byte |
brokerSampleDeserializationVersion() |
double |
diskUsage() |
boolean |
minRequiredBrokerMetricsAvailable() |
java.util.Set<RawMetricType> |
missingBrokerMetricsInMinSupportedVersion() |
double |
partitionMetric(java.lang.String topic,
int partition,
RawMetricType rawMetricType) |
boolean |
partitionMetricAvailable(org.apache.kafka.common.TopicPartition topic,
RawMetricType rawMetricType) |
void |
prepareBrokerMetrics(org.apache.kafka.common.Cluster cluster,
int brokerId,
long time)
Due to the yammer metric exponential decaying mechanism, the broker metric and the sum of the partition metrics
on the same broker may differ by a lot.
|
void |
recordMetric(CruiseControlMetric ccm) |
double |
topicMetrics(java.lang.String topic,
RawMetricType rawMetricType) |
boolean |
topicMetricsAvailable(java.lang.String topic) |
public void recordMetric(CruiseControlMetric ccm)
public boolean topicMetricsAvailable(java.lang.String topic)
public boolean minRequiredBrokerMetricsAvailable()
public boolean brokerMetricAvailable(RawMetricType rawMetricType)
public boolean partitionMetricAvailable(org.apache.kafka.common.TopicPartition topic, RawMetricType rawMetricType)
public java.util.Set<RawMetricType> missingBrokerMetricsInMinSupportedVersion()
public double brokerMetric(RawMetricType rawMetricType)
public double topicMetrics(java.lang.String topic, RawMetricType rawMetricType)
public double partitionMetric(java.lang.String topic, int partition, RawMetricType rawMetricType)
public void prepareBrokerMetrics(org.apache.kafka.common.Cluster cluster, int brokerId, long time)
cluster
- The Kafka cluster.brokerId
- The broker id to prepare metrics for.time
- The last sample time.public byte brokerSampleDeserializationVersion()
public double diskUsage()