DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
This change will impact external monitoring systems that rely on the old metric name; corresponding updates will be required.Due to
Since `REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC` and `REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC` are part of the public API, we introduce corresponding deprecated fields as a temporary bridge.
These fields are marked as deprecated because they serve as a transitional solution. They will be removed in Kafka 5.0.
| Code Block | ||
|---|---|---|
| ||
@Deprecated(since = "4.2")
public static final MetricName BRIDGE_REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC = getMetricName(
"kafka.log.remote", "RemoteStorageThreadPool", REMOTE_LOG_READER_TASK_QUEUE_SIZE);
@Deprecated(since = "4.2")
public static final MetricName BRIDGE_REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC = getMetricName(
"kafka.log.remote", "RemoteStorageThreadPool", REMOTE_LOG_READER_AVG_IDLE_PERCENT); |
Compatibility, Deprecation, and Migration Plan
- We will add a deprecated annotation on following constant
- `RemoteStorageMetrics#REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC`
- `RemoteStorageMetrics#REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC`
- `AssignmentsManager#QUEUED_REPLICA_TO_DIR_ASSIGNMENTS_METRIC`
- Add two new bridge fields to `RemoteStorageMetrics` and mark them as deprecated:
- `BRIDGE_REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC`
- `BRIDGE_REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC`
- Update the Kafka documentation to note MBean will be replaced
- `org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize`
- `org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent`
- `org.apache.kafka.server:type=AssignmentsManager.QueuedReplicaToDirAssignments`
- Register folowing new metrics
- `kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize`
- `kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent`
- `kafka.server:type=AssignmentsManager.QueuedReplicaToDirAssignments`
- Delete following all usage in code base at the Kafka 5.0
- `RemoteStorageMetrics#REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC`
- `RemoteStorageMetrics#REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC`
- `AssignmentsManager#QUEUED_REPLICA_TO_DIR_ASSIGNMENTS_METRIC`
- `BRIDGE_REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC`
- `BRIDGE_REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC`
- Update the group name to `kafka.log.remote` for the following fields in `RemoteStorageMetrics`:
- REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC
- REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC
Test Plan
- Add new tests to verify the new metric is correctly registered and behaves as expected.
- Ensure backward compatibility by verifying deprecated metric behavior until removal.
...