Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • org.apache.kafka.server.AssignmentsManager

Proposed Changes

  • Deprecate the

...

  • metric org.apache.kafka.server:type=

...

  • AssignmentsManager.
  • Introduce a new metric: kafka.server:type=

...

  • AssignmentsManager, consistent with other Kafka metrics.
  • This change will impact external monitoring systems that rely on

...

  • the old metric name; corresponding updates will be required.

Compatibility, Deprecation, and Migration Plan

  1. We will add Add a deprecated @Deprecated annotation on to `AssignmentsManager#QUEUED_REPLICA_TO_DIR_ASSIGNMENTS_METRIC`METRIC`.
  2. Update the Kafka documentation to note that the MBean :
    1. Note the deprecation of `org.apache.kafka.server:type=AssignmentsManager`
    will be deprecated and add new metrics
    1. .
    2. Introduce `kafka.server:type=AssignmentsManager`
    which will replaced `org.apache.kafka.server:type=AssignmentsManager` at next major release.
    1. as its replacement.
  3. Introduce a new constant Add new `AssignmentsManager#QUEUED_REPLICA_TO_DIR_ASSIGNMENTS_METRIC_NAME` which `metricName` is with the metricName set to `kafka.server:type=AssignmentsManager`  AssignmentsManager`, and add register it to in `AssignmentsManager#metricsRegistry`.
  4. Delete In the next major release: Remove the deprecated `AssignmentsManager#QUEUED_REPLICA_TO_DIR_ASSIGNMENTS_METRIC` at the next major release and remove it . Clean it up from `AssignmentsManager#metricsRegistry`.

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 removalWe should add new test for new metrics works expected as deprecated test.

Rejected Alternatives

n/a