public class BrokerMetricSample extends MetricSample<java.lang.String,BrokerEntity>
KafkaMetricDef
.Modifier and Type | Field and Description |
---|---|
static byte |
LATEST_SUPPORTED_VERSION |
static byte |
MIN_SUPPORTED_VERSION |
_entity, _sampleTime, _valuesByMetricId
Constructor and Description |
---|
BrokerMetricSample(java.lang.String host,
java.lang.Integer brokerId,
byte deserializationVersion)
Create a broker metric sample with the given host name, broker id, and version to be used in deserialization.
|
Modifier and Type | Method and Description |
---|---|
int |
brokerId() |
byte |
deserializationVersion() |
static BrokerMetricSample |
fromBytes(byte[] bytes)
Deserialize the bytes to get a broker metric data.
|
protected MetricDef |
metricDefForToString()
A method that can be overridden by subclasses to get prettier toString() format.
|
java.lang.Double |
metricFor(Resource resource) |
java.lang.Double |
metricValue(KafkaMetricDef kafkaMetricDef) |
byte[] |
toBytes()
Serialize the partition metric sample using the
LATEST_SUPPORTED_VERSION protocol. |
allMetricValues, close, entity, isValid, metricValue, record, sampleTime, toString
public static final byte MIN_SUPPORTED_VERSION
public static final byte LATEST_SUPPORTED_VERSION
public BrokerMetricSample(java.lang.String host, java.lang.Integer brokerId, byte deserializationVersion) throws UnknownVersionException
host
- Host name.brokerId
- Broker Id.deserializationVersion
- Version used in serialization that shows the latest version that a deserializer should use.UnknownVersionException
public byte deserializationVersion()
public int brokerId()
public byte[] toBytes()
LATEST_SUPPORTED_VERSION
protocol. The version field
indicates the version that a deserializer should use.
1 byte - version
4 bytes - broker ID
2 bytes - host name length
N bytes - host name
8 bytes - broker cpu utilization.
8 bytes - broker leader bytes in rate
8 bytes - broker leader bytes out rate
8 bytes - broker replication bytes in rate
8 bytes - broker replication bytes out rate
8 bytes - broker messages in rate
8 bytes - broker produce request rate
8 bytes - broker consumer fetch request rate
8 bytes - broker replication fetch request rate
8 bytes - broker request handler average idle percent
8 bytes - broker disk utilization
8 bytes - all topics produce request rate
8 bytes - all topics fetch request rate
8 bytes - sample time
4 bytes - broker request queue size
4 bytes - broker response queue size
8 bytes - broker produce request queue time ms (max)
8 bytes - broker produce request queue time ms (mean)
8 bytes - broker consumer fetch request queue time ms (max)
8 bytes - broker consumer fetch request queue time ms (mean)
8 bytes - broker follower fetch request queue time ms (max)
8 bytes - broker follower fetch request queue time ms (mean)
8 bytes - broker produce total time ms (max)
8 bytes - broker produce total time ms (mean)
8 bytes - broker consumer fetch total time ms (max)
8 bytes - broker consumer fetch total time ms (mean)
8 bytes - broker follower fetch total time ms (max)
8 bytes - broker follower fetch total time ms (mean)
8 bytes - broker produce local time ms (max)
8 bytes - broker produce local time ms (mean)
8 bytes - broker consumer fetch local time ms (max)
8 bytes - broker consumer fetch local time ms (mean)
8 bytes - broker follower fetch local time ms (max)
8 bytes - broker follower fetch local time ms (mean)
8 bytes - broker log flush rate
8 bytes - broker log flush time ms (max)
8 bytes - broker log flush time ms (mean)
8 bytes - broker produce request queue time ms (50TH percentile)
8 bytes - broker produce request queue time ms (999TH percentile)
8 bytes - broker consumer fetch request queue time ms (50TH percentile)
8 bytes - broker consumer fetch request queue time ms (999TH percentile)
8 bytes - broker follower fetch request queue time ms (50TH percentile)
8 bytes - broker follower fetch request queue time ms (999TH percentile)
8 bytes - broker produce total time ms (50TH percentile)
8 bytes - broker produce total time ms (999TH percentile)
8 bytes - broker consumer fetch total time ms (50TH percentile)
8 bytes - broker consumer fetch total time ms (999TH percentile)
8 bytes - broker follower fetch total time ms (50TH percentile)
8 bytes - broker follower fetch total time ms (999TH percentile)
8 bytes - broker produce local time ms (50TH percentile)
8 bytes - broker produce local time ms (999TH percentile)
8 bytes - broker consumer fetch local time ms (50TH percentile)
8 bytes - broker consumer fetch local time ms (999TH percentile)
8 bytes - broker follower fetch local time ms (50TH percentile)
8 bytes - broker follower fetch local time ms (999TH percentile)
8 bytes - broker log flush time ms (50TH percentile)
8 bytes - broker log flush time ms (999TH percentile)
8 bytes - broker disk capacitypublic static BrokerMetricSample fromBytes(byte[] bytes) throws UnknownVersionException
bytes
- the bytes to deserialize.UnknownVersionException
protected MetricDef metricDefForToString()
MetricSample
metricDefForToString
in class MetricSample<java.lang.String,BrokerEntity>
MetricDef
used for toString() method.public java.lang.Double metricFor(Resource resource)
public java.lang.Double metricValue(KafkaMetricDef kafkaMetricDef)