@Test
  public void deleteColumnFamilyTwice() throws Exception {
    Admin admin = TEST_UTIL.getAdmin();
    TableDescriptor beforehtd = admin.getDescriptor(TABLENAME);
    String cfToDelete = "cf1";

    FileSystem fs = TEST_UTIL.getDFSCluster().getFileSystem();

    // 1 - Check if table exists in descriptor
    assertTrue(admin.isTableAvailable(TABLENAME));

    // 2 - Check if all the target column family exist in descriptor
    ColumnFamilyDescriptor[] families = beforehtd.getColumnFamilies();
    Boolean foundCF = false;
    for (int i = 0; i < families.length; i++) {
      if (families[i].getNameAsString().equals(cfToDelete)) {
        foundCF = true;
        break;
      }
    }
    assertTrue(foundCF);

    // 3 - Check if table exists in FS
    Path tableDir = CommonFSUtils.getTableDir(TEST_UTIL.getDefaultRootDirPath(), TABLENAME);
    assertTrue(fs.exists(tableDir));

    // 4 - Check if all the target column family exist in FS
    FileStatus[] fileStatus = fs.listStatus(tableDir);
    foundCF = false;
    for (int i = 0; i < fileStatus.length; i++) {
      if (fileStatus[i].isDirectory() == true) {
        FileStatus[] cf = fs.listStatus(fileStatus[i].getPath(), new PathFilter() {
          @Override
          public boolean accept(Path p) {
            if (p.getName().contains(HConstants.RECOVERED_EDITS_DIR)) {
              return false;
            }
            return true;
          }
        });
        for (int j = 0; j < cf.length; j++) {
          if (cf[j].isDirectory() == true && cf[j].getPath().getName().equals(cfToDelete)) {
            foundCF = true;
            break;
          }
        }
      }
      if (foundCF) {
        break;
      }
    }
    assertTrue(foundCF);

    // TEST - Disable and delete the column family
    if (admin.isTableEnabled(TABLENAME)) {
      admin.disableTable(TABLENAME);
    }
    admin.deleteColumnFamily(TABLENAME, Bytes.toBytes(cfToDelete));

    // 5 - Check if the target column family is gone from the FS
    fileStatus = fs.listStatus(tableDir);
    for (int i = 0; i < fileStatus.length; i++) {
      if (fileStatus[i].isDirectory() == true) {
        FileStatus[] cf = fs.listStatus(fileStatus[i].getPath(), new PathFilter() {
          @Override
          public boolean accept(Path p) {
            if (WALSplitUtil.isSequenceIdFile(p)) {
              return false;
            }
            return true;
          }
        });
        for (int j = 0; j < cf.length; j++) {
          if (cf[j].isDirectory() == true) {
            assertFalse(cf[j].getPath().getName().equals(cfToDelete));
          }
        }
      }
    }

    try {
      // Test: delete again
      admin.deleteColumnFamily(TABLENAME, Bytes.toBytes(cfToDelete));
      Assert.fail("Delete a non-exist column family should fail");
    } catch (InvalidFamilyOperationException e) {
      // Expected.
    }
  }
Start up a mini cluster and put a small table of empty regions into it.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestDeleteColumnFamilyProcedureFromClient.java