You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2019/06/03 16:13:01 UTC

[jira] [Created] (KAFKA-8472) Use composition for better isolation of fetcher logic

Jason Gustafson created KAFKA-8472:
--------------------------------------

             Summary: Use composition for better isolation of fetcher logic
                 Key: KAFKA-8472
                 URL: https://issues.apache.org/jira/browse/KAFKA-8472
             Project: Kafka
          Issue Type: Improvement
            Reporter: Jason Gustafson
            Assignee: Jason Gustafson


Currently the log dir fetcher and the replica fetcher extend from `AbstractFetcherThread` even though the logic they implement is independent of the follower state machine. We can simplify testing and maintain a cleaner separation of concerns by pulling the behavior that needs to be customized into a separate trait. So the `FetcherThread` implementation can focus on the state machine and the new trait focuses on fetch mechanics (i.e. how to pull data from the source log) while avoiding the pitfalls of class inheritance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)