[ https://issues.apache.org/jira/browse/HBASE-10985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980729#comment-13980729 ]
Mikhail Antonov commented on HBASE-10985: ----------------------------------------- Looking at the patch, a few things needs some thinking. Actually, those are things similar in design to closing/opening region, unless I'm missing something? So I would try to unify some requirements to consensus classes, I guess. May be add to design doc too. That said, some of the items below may be a bit tricky to achieve at first cut.. 1) ConsensusProvider should only be instantiated / initialize()-d / start()-ed / stop()-ped once in Server impl (HMaster or HRegionServer) 2) SplitTransactionConsensus shouldn't use ZK api, i.e. shouldn't do any of this: - import ZK classes - take params like znodeVersion or ZK watcher (znode version and stuff like that we can encapsulate in classes like SplitTransactionProposal, or SplitTransactionDetails, and this SplitTransactionDetails class needs to be constructed from..protobuf request or something like that, while ZKWatcher should be retrieved from ZkConsensusProvider internally in consensus class), - throw KeeperException (we may need to introduce ConsensusException? didn't see the need so far, but sure we may need to) - have methods named after ZK concepts (like transitionNode(), should be..I don't know..finishTransaction() or something like that?) 3) I guess we shouldn't need to pass Server or RegionServerServices into consensus class methods, we should be able to retrieve them from consensusProvider. 4) SplitTransaction which we abstract shouldn't reference ZK API like KeeperException (I guess it was easier for closing regions somewhat, but here we need to either handle all KeeperException-s in ZkSplitTransactionConsensus, or add ConsensusException). Let me know if I missed something. > Decouple Split Transaction from Zookeeper > ----------------------------------------- > > Key: HBASE-10985 > URL: https://issues.apache.org/jira/browse/HBASE-10985 > Project: HBase > Issue Type: Sub-task > Components: Consensus, Zookeeper > Reporter: Sergey Soldatov > Attachments: HBASE-10985.patch, HBASE-10985.patch, HBASE-10985.patch > > > As part of HBASE-10296 SplitTransaction should be decoupled from Zookeeper. > This is an initial patch for review. At the moment the consensus provider > placed directly to SplitTransaction to minimize affected code. In the ideal > world it should be done in HServer. -- This message was sent by Atlassian JIRA (v6.2#6252)