Class HotPartitionManager
java.lang.Object
io.confluent.kafka.multitenant.metrics.HotPartitionManager
- All Implemented Interfaces:
org.apache.kafka.common.Configurable
Manages the per-partition hot partition metrics derived from the bytes-in and bytes-out metrics on each partition.
This classes provides the entry points of recording hot partitions' existence. It checks the current recorded
ingress/egress for the given partition and determines whether to record the hot partitions or not.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidmayRecordHotPartitionIn(org.apache.kafka.common.metrics.Metrics metrics, TenantMetrics.TenantMetricsContext context, org.apache.kafka.common.TopicPartition tp, long timeMs) Records the existence of hot partition ingress-wise for the given partition.voidmayRecordHotPartitionOut(org.apache.kafka.common.metrics.Metrics metrics, TenantMetrics.MetricsRequestContext context, org.apache.kafka.common.TopicPartition tp, long timeMs) Records the existence of hot partition egress-wise for the given partition.
-
Constructor Details
-
HotPartitionManager
public HotPartitionManager(org.apache.kafka.common.utils.Time time)
-
-
Method Details
-
configure
-
mayRecordHotPartitionIn
public void mayRecordHotPartitionIn(org.apache.kafka.common.metrics.Metrics metrics, TenantMetrics.TenantMetricsContext context, org.apache.kafka.common.TopicPartition tp, long timeMs) Records the existence of hot partition ingress-wise for the given partition. It first checks the current ingress of the given partition and determines whether to record the existence or not.- Parameters:
metrics- broker-wide metric registrycontext- request context to find the tenant and client idtp- topic partition to check and record hot partitiontimeMs- current timestamp in milliseconds
-
mayRecordHotPartitionOut
public void mayRecordHotPartitionOut(org.apache.kafka.common.metrics.Metrics metrics, TenantMetrics.MetricsRequestContext context, org.apache.kafka.common.TopicPartition tp, long timeMs) Records the existence of hot partition egress-wise for the given partition. It first checks the current egress of the given partition and determines whether to record the existence or not.- Parameters:
metrics- broker-wide metric registrycontext- request context to find the tenant and client idtp- topic partition to check and record hot partitiontimeMs- current timestamp in milliseconds
-