Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: prevent NullPointerException of polling two metrics in Kafka C…
…onnect `assignmentSnapshot` may not always get initialized in some cases, especially when Kafka connect is started from scratch. If `assignmentSnapshot` is not initialized, blindly resgistering `assigned-connectors` and `assigned-tasks` metrics will cause NullPointerException when the two metrics are polled. the proposed fix is to return 0 in both measure() method if `assignmentSnapshot` is null
- Loading branch information