topicStats(topic: String): BrokerTopicMetrics
BrokerTopicStats
BrokerTopicStats holds a set of topic-related metrics:
-
BrokerTopicMetrics stats per topic (by topic name)
-
Accumulated BrokerTopicMetrics for all topics
BrokerTopicStats is created exclusively when KafkaServer is requested to start up (and is used to create the KafkaApis, the ReplicaManager, the LogManager).
BrokerTopicStats, BrokerTopicMetrics and KafkaMetricsGroup
BrokerTopicStats holds one or more BrokerTopicMetrics.
BrokerTopicMetrics is a KafkaMetricsGroup that registers topic-related metrics in kafka.server:type=BrokerTopicMetrics group.
Every time BrokerTopicStats is updated so are the BrokerTopicMetrics of topics. In other words, every update of BrokerTopicStats changes kafka.server:type=BrokerTopicMetrics group.
Looking Up or Creating New BrokerTopicMetrics — topicStats Method
topicStats looks up or creates a new BrokerTopicMetrics for the given topic name.
|
Note
|
|
updateBytesOut Method
updateBytesOut(
topic: String,
isFollower: Boolean,
value: Long): Unit
updateBytesOut…FIXME
|
Note
|
updateBytesOut is used exclusively when KafkaApis is requested to handle a Fetch request.
|
updateReplicationBytesOut Internal Method
updateReplicationBytesOut(value: Long): Unit
updateReplicationBytesOut…FIXME
|
Note
|
updateReplicationBytesOut is used exclusively when BrokerTopicStats is requested to updateBytesOut.
|
updateReplicationBytesIn Method
updateReplicationBytesIn(value: Long): Unit
updateReplicationBytesIn…FIXME
|
Note
|
updateReplicationBytesIn is used exclusively when ReplicaFetcherThread is requested to processPartitionData.
|
removeMetrics Method
removeMetrics(topic: String): Unit
removeMetrics…FIXME
|
Note
|
removeMetrics is used when ReplicaManager is requested to stopReplica and handleLogDirFailure.
|
close Method
close(): Unit
close…FIXME
|
Note
|
close is used exclusively when KafkaServer is requested to shut down.
|