hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Jiang <syuanjiang...@gmail.com>
Subject RegionCoprocessorHost.preClose() execute multiple times
Date Tue, 14 Jun 2016 05:40:41 GMT
In RSRpcServices#closeRegion(), it calls RegionCoprocessorHost#preClose()
first, then calls HRegionServer#closeRegion().

In HRegionServer#closeRegion(), the RegionCoprocessorHost#preClose() is
called again.

I just wonder whether the RegionCoprocessorHost#preClose() call
in RSRpcServices#closeRegion() is unnecessary.  Anyone has idea?  The code
seems there forever.

I think we should be able to remove the call in RSRpcServices#closeRegion()
and rely on HRegionServer#closeRegion() call for this CP.




  public CloseRegionResponse closeRegion(final RpcController controller,

      final CloseRegionRequest request) throws ServiceException {


      // Can be null if we're calling close on a region that's not online

      final Region region = regionServer.getFromOnlineRegions(

      if ((region  != null) && (region .getCoprocessorHost() != null)) {




      boolean closed = regionServer.closeRegion(encodedRegionName, false, sn


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message