public class ReplicaMetricSample extends MetricSample<ReplicaEntity>
entity, sampleCloseTime, sampleOpenTime, valuesByMetricId
Constructor and Description |
---|
ReplicaMetricSample(int brokerId,
org.apache.kafka.common.PartitionInfo tp,
boolean isLeader)
Create a Sample for the replica of the partition
tp residing on
the broker brokerId . |
Modifier and Type | Method and Description |
---|---|
int |
brokerId()
The id of the broker from which the metrics are from.
|
String |
toString() |
allMetricValues, close, entity, isValid, metricDefForToString, metricValue, open, record, sampleCloseTime, sampleOpenTime
public ReplicaMetricSample(int brokerId, org.apache.kafka.common.PartitionInfo tp, boolean isLeader)
tp
residing on
the broker brokerId
.
The partition is guaranteed to be an alive (non-offline) partition,
i.e. the leader of the partition is not null.public int brokerId()
public String toString()
toString
in class MetricSample<ReplicaEntity>