kirktrue opened a new pull request, #14359: URL: https://github.com/apache/kafka/pull/14359
This continues the work of providing the groundwork for the fetch refactoring work by introducing some new classes and refactoring the existing code to use the new classes where applicable. Changes: * Minor clean up of the events classes to make data immutable, private, and implement `toString()`. * Added `IdempotentCloser` which prevents a resource from being closed more than once. It's general enough that it could be used elsewhere in the project, but it's limited to the consumer internals for now. * Extract inner classes from `AbstractFetch` into top-level classes to a) buffer raw results (`FetchBuffer`), and b) collect raw results into `ConsumerRecords` (`FetchCollector`). These can be tested and changed in isolation from the core fetcher logic. * Added `NodeStatusDetector` which abstracts methods from `ConsumerNetworkClient` so that it and `NetworkClientDelegate` can be used in `AbstractFetch` via the interface instead of using `ConsumerNetworkClient` directly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
