kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Gustafson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8472) Use composition for better isolation of fetcher logic
Date Mon, 03 Jun 2019 16:13:01 GMT
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

View raw message