Adjust broker-side observer interface so that the interface only take Java objects as argument.#8
Merged
Lincong merged 0 commit intoMar 30, 2019
Conversation
radai-rosenblatt
approved these changes
Mar 30, 2019
earlcoder
added a commit
that referenced
this pull request
Apr 28, 2026
…#7) The Partition.isOneAboveMinIsr method is still defined in 3.6-li but the gauge that exposes it as a JMX/yammer metric was lost in the PR #538 squash. Restoring matches 3.0-li ReplicaManager.scala:296. Audit also flagged the dead-code method as P1 #8 — restoring the gauge wires it back as the original caller.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous observer interface has a method called "observe" which takes
RequestChannel.RequestandAbstractResponseas arguments. However,RequestChannel.Requestis a class defined in Scala. Since the implementation of the observer interface is actually in Java. That means the Scala object needs to be converted in Java in the implementation. This conversion is prone to bugs, hard to read and can easily break compatibility if in the future upstream modify the structure ofRequestChannel.Request, which they did before and considered MINOR: https://github.com/apache/kafka/pull/3673/files#diff-d0332a0ff31df50afce3809d90505b25R49.Therefore, the adjusted observer interface takes 3 objects as shown below:
RequestContextobject.AbstractReqeustobject.AbstractResponseobject.