KAFKA-14960: [Part I]TopicMetadataRequestManager Implementation#7
Conversation
b7f2814 to
eef8a9f
Compare
kirktrue
left a comment
There was a problem hiding this comment.
I'd like to see how this plugs into the background thread and application event processor, specifically how it handles ensuring that duplicate API calls are handled appropriately.
Also, can we refactor TopicMetadataRequestManager and TopicMetadataFetcher so that they use the same core response handling logic?
8ae018e to
8616b93
Compare
|
I think I ommitted kirk's comments: Working on them ... |
8616b93 to
03ff808
Compare
kirktrue
left a comment
There was a problem hiding this comment.
I think I'm getting lost with all of the futures and callbacks. I feel we may want to do some restructuring, renaming, or documenting to keep things straight.
There was a problem hiding this comment.
Can we add some JavaDoc? I'm not totally sure when to use this class vs. using the future from the UnsentRequest.
fix broken test Add tests and fix response handler cleaned up and addressed some of the comments from the PR wip wip Testing the impl Added tests MetadataRequestManager and refactor the callbacks Update MetadataRequestManager.java Create MetadataRequestManager.java
90ed7de to
f09fd9a
Compare
|
@kirktrue thanks for the review! Ready for another pass. Think I addressed your comments. |
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
…o new consumer threading refactor This change introduces the FetchRequestManager that will be responsible for: - Formatting fetch requests to the background thread - Configuring the callback on fetch responses for the background thread The response handler will collect the fetch responses from the broker and create CompletedFetch instances as is done in Fetcher. The foreground logic will decompress the data into a Record, which will then be deserialized into a ConsumerRecord for returning to the user.
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
TopicMetadataRequestManager implementation --------- Co-authored-by: Lianet Magrans <lmagrans@confluent.io>
This is the implementation of the TopicMetadataRequestManager, responsible for handling topic metadata from
partitionsForandlistTopicsThe PR also refactors the current callback mechanism because I think the usage is rather inorganic. Now, user can pass in a BiConsumer to be triggered when the request is completed.
@kirktrue @lianetm