private boolean isMergeable(final MasterProcedureEnv env, final RegionState rs) throws IOException { GetRegionInfoResponse response = AssignmentManagerUtil.getRegionInfoResponse(env, rs.getServerName(), rs.getRegion()); return response.hasMergeable() && response.getMergeable(); }
GetRegionInfoResponse response = AssignmentManagerUtil.getRegionInfoResponse(env, node.getRegionLocation(), node.getRegionInfo(), true); if(bestSplitRow == null || bestSplitRow.length == 0) {
static GetRegionInfoResponse getRegionInfoResponse(final MasterProcedureEnv env, final ServerName regionLocation, final RegionInfo hri, boolean includeBestSplitRow) throws IOException { // TODO: There is no timeout on this controller. Set one! HBaseRpcController controller = env.getMasterServices().getClusterConnection().getRpcControllerFactory().newController(); final AdminService.BlockingInterface admin = env.getMasterServices().getClusterConnection().getAdmin(regionLocation); GetRegionInfoRequest request = null; if (includeBestSplitRow) { request = RequestConverter.buildGetRegionInfoRequest(hri.getRegionName(), false, true); } else { request = RequestConverter.buildGetRegionInfoRequest(hri.getRegionName()); } try { return admin.getRegionInfo(controller, request); } catch (ServiceException e) { throw ProtobufUtil.handleRemoteException(e); } }