[ https://issues.apache.org/jira/browse/ZOOKEEPER-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766096#action_12766096 ]
Flavio Paiva Junqueira commented on ZOOKEEPER-549: -------------------------------------------------- Thanks, Henry, the patch looks good. I have a couple of high level comments: * I think we should call "Peer*" classes something else because calling them Peer gives the idea that it contains functionality that belongs to leaders, followers, and observers. Leader does not extend Peer, though. Also, we already have a QuorumPeer class (and related classes), which makes it. In my interpretation, the common functionality between followers and observers is that they commit (learn) transactions, so we could call it a Committer or a Learner. I personally prefer the latter, and I'm obviously interested in other suggestions; * Most likely this should be a separate jira, but I'd like to propose that split the package structure further, in particular for the quorum package. I suggest: quorum.leader, quorum.peer, quorum.learner, quorum.le. > Refactor Followers and related classes into a Peer->Follower hierarchy in > preparation for Observers > --------------------------------------------------------------------------------------------------- > > Key: ZOOKEEPER-549 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-549 > Project: Zookeeper > Issue Type: Improvement > Components: quorum, server > Affects Versions: 3.2.1 > Reporter: Henry Robinson > Assignee: Henry Robinson > Fix For: 3.3.0 > > Attachments: ZOOKEEPER-549.patch, ZOOKEEPER-549.patch > > > For the Observers patch (ZOOKEEPER-368), a lot of functionality is shared > between Followers and Observers. To avoid copying code, it makes sense to > push the common code into a parent Peer class and specialise it for Followers > and Observers. At the same time, some of the lengthier methods in Follower > can be broken up to make the code more readable. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.