public void deleteFamilyFromFS(RegionInfo region, byte[] familyName) throws IOException { deleteFamilyFromFS(rootdir, region, familyName); }
/** * Remove the column family from the file system **/ public static void deleteColumnFamilyFromFileSystem( final MasterProcedureEnv env, final TableName tableName, final List<RegionInfo> regionInfoList, final byte[] familyName, final boolean hasMob) throws IOException { final MasterFileSystem mfs = env.getMasterServices().getMasterFileSystem(); if (LOG.isDebugEnabled()) { LOG.debug("Removing family=" + Bytes.toString(familyName) + " from table=" + tableName); } for (RegionInfo hri : regionInfoList) { // Delete the family directory in FS for all the regions one by one mfs.deleteFamilyFromFS(hri, familyName); } if (hasMob) { // Delete the mob region Path mobRootDir = new Path(mfs.getRootDir(), MobConstants.MOB_DIR_NAME); RegionInfo mobRegionInfo = MobUtils.getMobRegionInfo(tableName); mfs.deleteFamilyFromFS(mobRootDir, mobRegionInfo, familyName); } } }
@Override protected void handleTableOperation(List<HRegionInfo> hris) throws IOException { MasterFileSystem mfs = this.masterServices.getMasterFileSystem(); // Update table descriptor mfs.deleteColumn(tableName, familyName); // Remove the column family from the file system for (HRegionInfo hri : hris) { // Delete the family directory in FS for all the regions one by one mfs.deleteFamilyFromFS(hri, familyName); } }
/** * Remove the column family from the file system **/ public static void deleteColumnFamilyFromFileSystem( final MasterProcedureEnv env, final TableName tableName, List<HRegionInfo> regionInfoList, final byte[] familyName) throws IOException { final MasterFileSystem mfs = env.getMasterServices().getMasterFileSystem(); if (LOG.isDebugEnabled()) { LOG.debug("Removing family=" + Bytes.toString(familyName) + " from table=" + tableName); } if (regionInfoList == null) { regionInfoList = ProcedureSyncWait.getRegionsFromMeta(env, tableName); } for (HRegionInfo hri : regionInfoList) { // Delete the family directory in FS for all the regions one by one mfs.deleteFamilyFromFS(hri, familyName); } }