[ 
https://issues.apache.org/jira/browse/HBASE-10915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961149#comment-13961149
 ] 

stack commented on HBASE-10915:
-------------------------------

Oh, otherwise, patch looks great.  I see you pass the zkcrd to the consensus 
inside the close region handler.  Can it be passed to the factory that makes 
the consensus implementation so you don't have to pass it each time you need to 
do an operation on the consensus implementation?

How we going change this pattern:

+       CloseRegionConsensus consensus = new 
ZkCloseRegionConsensus(server.getZooKeeper());
+       ZkCloseRegionConsensus.ZkCloseRegionDetails zkCrd =
+         new ZkCloseRegionConsensus.ZkCloseRegionDetails();
+       zkCrd.setZk(true);
+       zkCrd.setExpectedVersion(versionOfClosingNode+1);
+       zkCrd.setServerName(server.getServerName());


... to be something like:

CRC consensus = ConsensusFactory.create(configuration, ConsensusBuildingVitals 
cbv)

... where cbv in the above has stuff like the zk info in it?

Problem w/ the above is that zk is not hidden.  The CBV we pass is all zk info 
which makes no sense if we have a different consensus implementation?

> Decouple CloseRegionHandler from ZooKeeper
> ------------------------------------------
>
>                 Key: HBASE-10915
>                 URL: https://issues.apache.org/jira/browse/HBASE-10915
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Zookeeper
>            Reporter: Mikhail Antonov
>            Assignee: Mikhail Antonov
>         Attachments: HBASE-10915.patch
>
>
> Decouple CloseRegionHandler class from ZK API.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to