data/raw/hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
/**
   * Offline specified region from master's in-memory state. It will not attempt to
   * reassign the region as in unassign.
   *
   * This is a special method that should be used by experts or hbck.
   *
   */
Offline specified region from master's in-memory state. It will not attempt to
reassign the region as in unassign.

This is a special method that should be used by experts or hbck.
Offline specified region from master ' s in - memory state . It will not attempt to reassign the region as in unassign . This is a special method that should be used by experts or hbck .
@Override
  public OfflineRegionResponse offlineRegion(RpcController controller,
      OfflineRegionRequest request) throws ServiceException {
    try {
      master.checkInitialized();
      final RegionSpecifierType type = request.getRegion().getType();
      if (type != RegionSpecifierType.REGION_NAME) {
        LOG.warn("moveRegion specifier type: expected: " + RegionSpecifierType.REGION_NAME
          + " actual: " + type);
      }
      final byte[] regionName = request.getRegion().getValue().toByteArray();
      final RegionInfo hri = master.getAssignmentManager().getRegionInfo(regionName);
      if (hri == null) throw new UnknownRegionException(Bytes.toStringBinary(regionName));
      if (master.cpHost != null) {
        master.cpHost.preRegionOffline(hri);
      }
      LOG.info(master.getClientIdAuditPrefix() + " offline " + hri.getRegionNameAsString());
      master.getAssignmentManager().offlineRegion(hri);
      if (master.cpHost != null) {
        master.cpHost.postRegionOffline(hri);
      }
    } catch (IOException ioe) {
      throw new ServiceException(ioe);
    }
    return OfflineRegionResponse.newBuilder().build();
  }
@ Override public OfflineRegionResponse offlineRegion ( RpcController controller , OfflineRegionRequest request ) throws ServiceException { try { master . checkInitialized ( ) ; final RegionSpecifierType type = request . getRegion ( ) . getType ( ) ; if ( type != RegionSpecifierType . REGION_NAME ) { LOG . warn ( "moveRegion specifier type: expected: " + RegionSpecifierType . REGION_NAME + " actual: " + type ) ; } final byte [ ] regionName = request . getRegion ( ) . getValue ( ) . toByteArray ( ) ; final RegionInfo hri = master . getAssignmentManager ( ) . getRegionInfo ( regionName ) ; if ( hri == null ) throw new UnknownRegionException ( Bytes . toStringBinary ( regionName ) ) ; if ( master . cpHost != null ) { master . cpHost . preRegionOffline ( hri ) ; } LOG . info ( master . getClientIdAuditPrefix ( ) + " offline " + hri . getRegionNameAsString ( ) ) ; master . getAssignmentManager ( ) . offlineRegion ( hri ) ; if ( master . cpHost != null ) { master . cpHost . postRegionOffline ( hri ) ; } } catch ( IOException ioe ) { throw new ServiceException ( ioe ) ; } return OfflineRegionResponse . newBuilder ( ) . build ( ) ; }
Offline specified region from master's in-memory state.
Offline specified region from master ' s in - memory state .