[ https://issues.apache.org/jira/browse/HBASE-10915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986357#comment-13986357 ]
stack commented on HBASE-10915: ------------------------------- You think +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/consensus/CloseRegionConsensus.java should be in a subpackage? Strikes me that it core to HRS operation so so should be at same level. This is very nice: {code} - int versionOfClosingNode = -1; - if (request.hasVersionOfClosingNode()) { - versionOfClosingNode = request.getVersionOfClosingNode(); - } - boolean zk = request.getTransitionInZK(); final ServerName sn = (request.hasDestinationServer() ? ProtobufUtil.toServerName(request.getDestinationServer()) : null); @@ -887,10 +883,11 @@ } requestCount.increment(); - LOG.info("Close " + encodedRegionName + ", via zk=" + (zk ? "yes" : "no") - + ", znode version=" + versionOfClosingNode + ", on " + sn); + LOG.info("Close " + encodedRegionName + ", on " + sn); + CloseRegionConsensus.CloseRegionDetails crd = regionServer.getConsensusProvider() + .getCloseRegionConsensus().parseFromProtoRequest(request); {code} Hide that ugly zk stuff! Good: - boolean closed = regionServer.closeRegion(encodedRegionName, false, zk, versionOfClosingNode, sn); + boolean closed = regionServer.closeRegion(encodedRegionName, false, crd, sn); What can we do about this Mikhail? +import org.apache.hadoop.hbase.regionserver.consensus.CloseRegionConsensus; +import org.apache.hadoop.hbase.regionserver.consensus.ZkCloseRegionConsensus; It seems odd that a o.a.h.h.consensus package would import lower-level RS stuff. Can Interface only be up at this level but the impementation down in RS? I suppose you want to have a listing of all the ZK implementations up here at the top level though they are implemented all over. I suppose we could live w/ that but given the little trick above you do w/ details, you might have another up your sleeve to solve this package tangle. Otherwise, this is close IMO ([~jxiang] You should take a look at this if you get a chance -- I think you'll like it) > Decouple region closing (HM and HRS) from ZK > -------------------------------------------- > > Key: HBASE-10915 > URL: https://issues.apache.org/jira/browse/HBASE-10915 > Project: HBase > Issue Type: Sub-task > Components: Consensus, Zookeeper > Affects Versions: 0.99.0 > Reporter: Mikhail Antonov > Assignee: Mikhail Antonov > Attachments: HBASE-10915.patch, HBASE-10915.patch, HBASE-10915.patch, > HBASE-10915.patch, HBASE-10915.patch, HBASE-10915.patch, HBASE-10915.patch, > HBASE-10915.patch, HBASE-10915.patch, HBASE-10915.patch > > > Decouple region closing from ZK. > Includes RS side (CloseRegionHandler), HM side (ClosedRegionHandler) and the > code using (HRegionServer, RSRpcServices etc). > May need small changes in AssignmentManager. -- This message was sent by Atlassian JIRA (v6.2#6252)