forked from apache/kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: Remove redundant metric reset in KafkaController (apache#12158)
The following variables in `KafkaController` are used for metrics: ``` offlinePartitionCount preferredReplicaImbalanceCount globalTopicCount globalPartitionCount topicsToDeleteCount replicasToDeleteCount ineligibleTopicsToDeleteCount ineligibleReplicasToDeleteCount ``` When the controller goes from active to non-active, these variables will be reset to 0. Currently, this is done explicitly in in `KafkaController.onControllerResignation()` and also after every loop iteration in `KafkaController.updateMetrics()` . The first of these is redundant and can be removed. This patch fixes this and also simplifies `updateMetrics`. Reviewers: Jason Gustafson <[email protected]>
- Loading branch information
Showing
1 changed file
with
31 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters