KAFKA-8599: Use automatic RPC generation in ExpireDelegationToken#7098
Closed
mimaison wants to merge 1 commit into
Closed
KAFKA-8599: Use automatic RPC generation in ExpireDelegationToken#7098mimaison wants to merge 1 commit into
mimaison wants to merge 1 commit into
Conversation
Member
Author
| ByteBuffer buf = (ByteBuffer) result; | ||
| byte[] arr = new byte[buf.remaining()]; | ||
| buf.get(arr); | ||
| buf.flip(); |
Contributor
There was a problem hiding this comment.
On the other hand I was debating whether it's worth to use buf.duplicate().get() instead of flipping on the expense of creating a lightweight ByteBuffer object. Advantages is that we don't mutate the current buffer but instead work on a throwaway object.
Member
Author
There was a problem hiding this comment.
Yeah, I too was unsure which way to go. I'm happy with either solutions, let's see what a committer thinks
Contributor
Member
Author
There was a problem hiding this comment.
By not flipping the buffer, the position stays at the end. Then when comparing Requests, the ones built via a Struct were not equals to the ones built directly.
Member
Author
|
@omkreddy Can you have a look? |
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.
Committer Checklist (excluded from commit message)