Java Code Examples for org.apache.hadoop.hbase.client.TableDescriptor#getTableName()

The following examples show how to use org.apache.hadoop.hbase.client.TableDescriptor#getTableName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 6 votes vote down vote up
@Override
void perform() throws IOException {

  TableDescriptor selected = selectTable(disabledTables);
  if (selected == null) {
    return;
  }

  Admin admin = connection.getAdmin();
  try {
    TableName tableName = selected.getTableName();
    LOG.info("Deleting table :" + selected);
    admin.deleteTable(tableName);
    Assert.assertFalse("Table: " + selected + " was not deleted",
            admin.tableExists(tableName));
    deletedTables.put(tableName, selected);
    LOG.info("Deleted table :" + selected);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 2
Source File: RegionSplitPolicy.java    From hbase with Apache License 2.0 6 votes vote down vote up
public static Class<? extends RegionSplitPolicy> getSplitPolicyClass(
    TableDescriptor htd, Configuration conf) throws IOException {
  String className = htd.getRegionSplitPolicyClassName();
  if (className == null) {
    className = conf.get(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
        DEFAULT_SPLIT_POLICY_CLASS.getName());
  }

  try {
    Class<? extends RegionSplitPolicy> clazz =
      Class.forName(className).asSubclass(RegionSplitPolicy.class);
    return clazz;
  } catch (Exception  e) {
    throw new IOException(
        "Unable to load configured region split policy '" +
        className + "' for table '" + htd.getTableName() + "'",
        e);
  }
}
 
Example 3
Source File: HBaseFsck.java    From hbase with Apache License 2.0 6 votes vote down vote up
/** Loads table info's for tables that may not have been included, since there are no
 * regions reported for the table, but table dir is there in hdfs
 */
private void loadTableInfosForTablesWithNoRegion() throws IOException {
  Map<String, TableDescriptor> allTables = new FSTableDescriptors(getConf()).getAll();
  for (TableDescriptor htd : allTables.values()) {
    if (checkMetaOnly && !htd.isMetaTable()) {
      continue;
    }

    TableName tableName = htd.getTableName();
    if (isTableIncluded(tableName) && !tablesInfo.containsKey(tableName)) {
      HbckTableInfo tableInfo = new HbckTableInfo(tableName, this);
      tableInfo.htds.add(htd);
      tablesInfo.put(htd.getTableName(), tableInfo);
    }
  }
}
 
Example 4
Source File: TestBulkLoadHFiles.java    From hbase with Apache License 2.0 6 votes vote down vote up
private void runTest(String testName, TableDescriptor htd, boolean preCreateTable,
  byte[][] tableSplitKeys, byte[][][] hfileRanges, boolean useMap, boolean copyFiles, int depth)
  throws Exception {
  loadHFiles(testName, htd, util, FAMILY, QUALIFIER, preCreateTable, tableSplitKeys, hfileRanges,
    useMap, true, copyFiles, 0, 1000, depth);

  final TableName tableName = htd.getTableName();
  // verify staging folder has been cleaned up
  Path stagingBasePath = new Path(CommonFSUtils.getRootDir(util.getConfiguration()),
    HConstants.BULKLOAD_STAGING_DIR_NAME);
  FileSystem fs = util.getTestFileSystem();
  if (fs.exists(stagingBasePath)) {
    FileStatus[] files = fs.listStatus(stagingBasePath);
    for (FileStatus file : files) {
      assertTrue("Folder=" + file.getPath() + " is not cleaned up.",
        file.getPath().getName() != "DONOTERASE");
    }
  }

  util.deleteTable(tableName);
}
 
Example 5
Source File: MasterRegion.java    From hbase with Apache License 2.0 6 votes vote down vote up
private static HRegion bootstrap(Configuration conf, TableDescriptor td, FileSystem fs,
  Path rootDir, FileSystem walFs, Path walRootDir, WALFactory walFactory,
  MasterRegionWALRoller walRoller, String serverName) throws IOException {
  TableName tn = td.getTableName();
  RegionInfo regionInfo = RegionInfoBuilder.newBuilder(tn).setRegionId(REGION_ID).build();
  Path tmpTableDir = CommonFSUtils.getTableDir(rootDir,
    TableName.valueOf(tn.getNamespaceAsString(), tn.getQualifierAsString() + "-tmp"));
  if (fs.exists(tmpTableDir) && !fs.delete(tmpTableDir, true)) {
    throw new IOException("Can not delete partial created proc region " + tmpTableDir);
  }
  HRegion.createHRegion(conf, regionInfo, fs, tmpTableDir, td).close();
  Path tableDir = CommonFSUtils.getTableDir(rootDir, tn);
  if (!fs.rename(tmpTableDir, tableDir)) {
    throw new IOException("Can not rename " + tmpTableDir + " to " + tableDir);
  }
  WAL wal = createWAL(walFactory, walRoller, serverName, walFs, walRootDir, regionInfo);
  return HRegion.openHRegionFromTableDir(conf, fs, tableDir, regionInfo, td, wal, null, null);
}
 
Example 6
Source File: HMaster.java    From hbase with Apache License 2.0 6 votes vote down vote up
@Override
public long createSystemTable(final TableDescriptor tableDescriptor) throws IOException {
  if (isStopped()) {
    throw new MasterNotRunningException();
  }

  TableName tableName = tableDescriptor.getTableName();
  if (!(tableName.isSystemTable())) {
    throw new IllegalArgumentException(
      "Only system table creation can use this createSystemTable API");
  }

  RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(tableDescriptor, null);

  LOG.info(getClientIdAuditPrefix() + " create " + tableDescriptor);

  // This special create table is called locally to master.  Therefore, no RPC means no need
  // to use nonce to detect duplicated RPC call.
  long procId = this.procedureExecutor.submitProcedure(
    new CreateTableProcedure(procedureExecutor.getEnvironment(), tableDescriptor, newRegions));

  return procId;
}
 
Example 7
Source File: AbstractPeerProcedure.java    From hbase with Apache License 2.0 6 votes vote down vote up
protected final void setLastPushedSequenceId(MasterProcedureEnv env,
    ReplicationPeerConfig peerConfig) throws IOException, ReplicationException {
  Map<String, Long> lastSeqIds = new HashMap<String, Long>();
  for (TableDescriptor td : env.getMasterServices().getTableDescriptors().getAll().values()) {
    if (!td.hasGlobalReplicationScope()) {
      continue;
    }
    TableName tn = td.getTableName();
    if (!peerConfig.needToReplicate(tn)) {
      continue;
    }
    setLastPushedSequenceIdForTable(env, tn, lastSeqIds);
  }
  if (!lastSeqIds.isEmpty()) {
    env.getReplicationPeerManager().getQueueStorage().setLastSequenceIds(peerId, lastSeqIds);
  }
}
 
Example 8
Source File: ModifyPeerProcedure.java    From hbase with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
protected void reopenRegions(MasterProcedureEnv env) throws IOException {
  ReplicationPeerConfig peerConfig = getNewPeerConfig();
  ReplicationPeerConfig oldPeerConfig = getOldPeerConfig();
  TableStateManager tsm = env.getMasterServices().getTableStateManager();
  for (TableDescriptor td : env.getMasterServices().getTableDescriptors().getAll().values()) {
    if (!td.hasGlobalReplicationScope()) {
      continue;
    }
    TableName tn = td.getTableName();
    if (!peerConfig.needToReplicate(tn)) {
      continue;
    }
    if (oldPeerConfig != null && oldPeerConfig.isSerial() &&
      oldPeerConfig.needToReplicate(tn)) {
      continue;
    }
    if (needReopen(tsm, tn)) {
      addChildProcedure(new ReopenTableRegionsProcedure(tn));
    }
  }
}
 
Example 9
Source File: TestCreateTableProcedure.java    From hbase with Apache License 2.0 6 votes vote down vote up
private void testRollbackAndDoubleExecution(TableDescriptorBuilder builder) throws Exception {
  // create the table
  final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor();
  ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, true);

  // Start the Create procedure && kill the executor
  final byte[][] splitKeys = new byte[][] {
    Bytes.toBytes("a"), Bytes.toBytes("b"), Bytes.toBytes("c")
  };
  builder.setRegionReplication(3);
  TableDescriptor htd = builder.build();
  RegionInfo[] regions = ModifyRegionUtils.createRegionInfos(htd, splitKeys);
  long procId = procExec.submitProcedure(
    new CreateTableProcedure(procExec.getEnvironment(), htd, regions));

  int lastStep = 2; // failing before CREATE_TABLE_WRITE_FS_LAYOUT
  MasterProcedureTestingUtility.testRollbackAndDoubleExecution(procExec, procId, lastStep);

  TableName tableName = htd.getTableName();
  MasterProcedureTestingUtility.validateTableDeletion(getMaster(), tableName);

  // are we able to create the table after a rollback?
  resetProcExecutorTestingKillFlag();
  testSimpleCreate(tableName, splitKeys);
}
 
Example 10
Source File: TableStateManager.java    From hbase with Apache License 2.0 5 votes vote down vote up
private void fixTableStates(TableDescriptors tableDescriptors, Connection connection)
    throws IOException {
  Map<String, TableState> states = new HashMap<>();
  // NOTE: Full hbase:meta table scan!
  MetaTableAccessor.fullScanTables(connection, new ClientMetaTableAccessor.Visitor() {
    @Override
    public boolean visit(Result r) throws IOException {
      TableState state = CatalogFamilyFormat.getTableState(r);
      states.put(state.getTableName().getNameAsString(), state);
      return true;
    }
  });
  for (TableDescriptor tableDesc : tableDescriptors.getAll().values()) {
    TableName tableName = tableDesc.getTableName();
    if (TableName.isMetaTableName(tableName)) {
      // This table is always enabled. No fixup needed. No entry in hbase:meta needed.
      // Call through to fixTableState though in case a super class wants to do something.
      fixTableState(new TableState(tableName, TableState.State.ENABLED));
      continue;
    }
    TableState tableState = states.get(tableName.getNameAsString());
    if (tableState == null) {
      LOG.warn(tableName + " has no table state in hbase:meta, assuming ENABLED");
      MetaTableAccessor.updateTableState(connection, tableName, TableState.State.ENABLED);
      fixTableState(new TableState(tableName, TableState.State.ENABLED));
      tableName2State.put(tableName, TableState.State.ENABLED);
    } else {
      fixTableState(tableState);
      tableName2State.put(tableName, tableState.getState());
    }
  }
}
 
Example 11
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
void perform() throws IOException {
  Admin admin = connection.getAdmin();
  try {
    TableDescriptor td = createTableDesc();
    TableName tableName = td.getTableName();
    if ( admin.tableExists(tableName)){
      return;
    }
    String numRegionKey = String.format(NUM_REGIONS_KEY, this.getClass().getSimpleName());
    numRegions = getConf().getInt(numRegionKey, DEFAULT_NUM_REGIONS);
    byte[] startKey = Bytes.toBytes("row-0000000000");
    byte[] endKey = Bytes.toBytes("row-" + Integer.MAX_VALUE);
    LOG.info("Creating table:" + td);
    admin.createTable(td, startKey, endKey, numRegions);
    Assert.assertTrue("Table: " + td + " was not created", admin.tableExists(tableName));
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    Assert.assertTrue(
      "After create, Table: " + tableName + " in not enabled", admin.isTableEnabled(tableName));
    enabledTables.put(tableName, freshTableDesc);
    LOG.info("Created table:" + freshTableDesc);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 12
Source File: AbstractTestFSWAL.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Test
public void testWriteEntryCanBeNull() throws IOException {
  String testName = currentTest.getMethodName();
  AbstractFSWAL<?> wal = newWAL(FS, CommonFSUtils.getWALRootDir(CONF), DIR.toString(), testName,
    CONF, null, true, null, null);
  wal.close();
  TableDescriptor td = TableDescriptorBuilder.newBuilder(TableName.valueOf("table"))
    .setColumnFamily(ColumnFamilyDescriptorBuilder.of("row")).build();
  RegionInfo ri = RegionInfoBuilder.newBuilder(td.getTableName()).build();
  MultiVersionConcurrencyControl mvcc = new MultiVersionConcurrencyControl();
  NavigableMap<byte[], Integer> scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);
  for (byte[] fam : td.getColumnFamilyNames()) {
    scopes.put(fam, 0);
  }
  long timestamp = System.currentTimeMillis();
  byte[] row = Bytes.toBytes("row");
  WALEdit cols = new WALEdit();
  cols.add(new KeyValue(row, row, row, timestamp, row));
  WALKeyImpl key =
      new WALKeyImpl(ri.getEncodedNameAsBytes(), td.getTableName(), SequenceId.NO_SEQUENCE_ID,
        timestamp, WALKey.EMPTY_UUIDS, HConstants.NO_NONCE, HConstants.NO_NONCE, mvcc, scopes);
  try {
    wal.append(ri, key, cols, true);
    fail("Should fail since the wal has already been closed");
  } catch (IOException e) {
    // expected
    assertThat(e.getMessage(), containsString("log is closed"));
    // the WriteEntry should be null since we fail before setting it.
    assertNull(key.getWriteEntry());
  }
}
 
Example 13
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
void perform() throws IOException {
  TableDescriptor selected = selectTable(disabledTables);
  if (selected == null) {
    return;
  }

  Admin admin = connection.getAdmin();
  try {
    ColumnFamilyDescriptor cfd = createFamilyDesc();
    if (selected.hasColumnFamily(cfd.getName())){
      LOG.info(new String(cfd.getName()) + " already exists in table "
          + selected.getTableName());
      return;
    }
    TableName tableName = selected.getTableName();
    LOG.info("Adding column family: " + cfd + " to table: " + tableName);
    admin.addColumnFamily(tableName, cfd);
    // assertion
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    Assert.assertTrue("Column family: " + cfd + " was not added",
        freshTableDesc.hasColumnFamily(cfd.getName()));
    Assert.assertTrue(
      "After add column family, Table: " + tableName + " is not disabled",
      admin.isTableDisabled(tableName));
    disabledTables.put(tableName, freshTableDesc);
    LOG.info("Added column family: " + cfd + " to table: " + tableName);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 14
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
void perform() throws IOException {
  TableDescriptor selected = selectTable(disabledTables);
  ColumnFamilyDescriptor cfd = selectFamily(selected);
  if (selected == null || cfd == null) {
    return;
  }

  Admin admin = connection.getAdmin();
  try {
    if (selected.getColumnFamilyCount() < 2) {
      LOG.info("No enough column families to delete in table " + selected.getTableName());
      return;
    }
    TableName tableName = selected.getTableName();
    LOG.info("Deleting column family: " + cfd + " from table: " + tableName);
    admin.deleteColumnFamily(tableName, cfd.getName());
    // assertion
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    Assert.assertFalse("Column family: " + cfd + " was not added",
        freshTableDesc.hasColumnFamily(cfd.getName()));
    Assert.assertTrue(
      "After delete column family, Table: " + tableName + " is not disabled",
      admin.isTableDisabled(tableName));
    disabledTables.put(tableName, freshTableDesc);
    LOG.info("Deleted column family: " + cfd + " from table: " + tableName);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 15
Source File: SnapshotScannerHDFSAclController.java    From hbase with Apache License 2.0 4 votes vote down vote up
private boolean needHandleTableHdfsAcl(TableDescriptor tableDescriptor, String operation) {
  TableName tableName = tableDescriptor.getTableName();
  return !tableName.isSystemTable() && checkInitialized(operation)
      && hdfsAclHelper.isAclSyncToHdfsEnabled(tableDescriptor);
}
 
Example 16
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
void perform() throws IOException {

  TableDescriptor selected = selectTable(enabledTables);
  if (selected == null) {
    return;
  }

  Admin admin = connection.getAdmin();
  try {
    TableName tableName = selected.getTableName();
    LOG.info("Disabling table :" + selected);
    admin.disableTable(tableName);
    Assert.assertTrue("Table: " + selected + " was not disabled",
        admin.isTableDisabled(tableName));
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    Assert.assertTrue(
      "After disable, Table: " + tableName + " is not disabled",
      admin.isTableDisabled(tableName));
    disabledTables.put(tableName, freshTableDesc);
    LOG.info("Disabled table :" + freshTableDesc);
  } catch (Exception e){
    LOG.warn("Caught exception in action: " + this.getClass());
    // TODO workaround
    // loose restriction for TableNotDisabledException/TableNotEnabledException thrown in sync
    // operations
    // 1) when enable/disable starts, the table state is changed to ENABLING/DISABLING (ZK node
    // in 1.x), which will be further changed to ENABLED/DISABLED once the operation completes
    // 2) if master failover happens in the middle of the enable/disable operation, the new
    // master will try to recover the tables in ENABLING/DISABLING state, as programmed in
    // AssignmentManager#recoverTableInEnablingState() and
    // AssignmentManager#recoverTableInDisablingState()
    // 3) after the new master initialization completes, the procedure tries to re-do the
    // enable/disable operation, which was already done. Ignore those exceptions before change
    // of behaviors of AssignmentManager in presence of PV2
    if (e instanceof TableNotEnabledException) {
      LOG.warn("Caught TableNotEnabledException in action: " + this.getClass());
      e.printStackTrace();
    } else {
      throw e;
    }
  } finally {
    admin.close();
  }
}
 
Example 17
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
void perform() throws IOException {
  TableDescriptor selected = selectTable(enabledTables);
  if (selected == null ) {
    return;
  }

  Admin admin = connection.getAdmin();
  TableName tableName = selected.getTableName();
  try (Table table = connection.getTable(tableName)){
    ArrayList<RegionInfo> regionInfos = new ArrayList<>(admin.getRegions(
        selected.getTableName()));
    int numRegions = regionInfos.size();
    // average number of rows to be added per action to each region
    int average_rows = 1;
    int numRows = average_rows * numRegions;
    LOG.info("Adding " + numRows + " rows to table: " + selected);
    for (int i = 0; i < numRows; i++){
      // nextInt(Integer.MAX_VALUE)) to return positive numbers only
      byte[] rowKey = Bytes.toBytes(
          "row-" + String.format("%010d", RandomUtils.nextInt()));
      ColumnFamilyDescriptor cfd = selectFamily(selected);
      if (cfd == null){
        return;
      }
      byte[] family = cfd.getName();
      byte[] qualifier = Bytes.toBytes("col-" + RandomUtils.nextInt() % 10);
      byte[] value = Bytes.toBytes("val-" + RandomStringUtils.randomAlphanumeric(10));
      Put put = new Put(rowKey);
      put.addColumn(family, qualifier, value);
      table.put(put);
    }
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    Assert.assertTrue(
      "After insert, Table: " + tableName + " in not enabled", admin.isTableEnabled(tableName));
    enabledTables.put(tableName, freshTableDesc);
    LOG.info("Added " + numRows + " rows to table: " + selected);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 18
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
void perform() throws IOException {
  TableDescriptor selected = selectTable(disabledTables);
  if (selected == null) {
    return;
  }
  ColumnFamilyDescriptor columnDesc = selectFamily(selected);
  if (columnDesc == null){
    return;
  }

  Admin admin = connection.getAdmin();
  int versions = RandomUtils.nextInt(0, 10) + 3;
  try {
    TableName tableName = selected.getTableName();
    LOG.info("Altering versions of column family: " + columnDesc + " to: " + versions +
        " in table: " + tableName);

    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(columnDesc)
        .setMinVersions(versions)
        .setMaxVersions(versions)
        .build();
    TableDescriptor td = TableDescriptorBuilder.newBuilder(selected)
        .modifyColumnFamily(cfd)
        .build();
    admin.modifyTable(td);

    // assertion
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    ColumnFamilyDescriptor freshColumnDesc = freshTableDesc.getColumnFamily(columnDesc.getName());
    Assert.assertEquals("Column family: " + columnDesc + " was not altered",
        freshColumnDesc.getMaxVersions(), versions);
    Assert.assertEquals("Column family: " + freshColumnDesc + " was not altered",
        freshColumnDesc.getMinVersions(), versions);
    Assert.assertTrue(
      "After alter versions of column family, Table: " + tableName + " is not disabled",
      admin.isTableDisabled(tableName));
    disabledTables.put(tableName, freshTableDesc);
    LOG.info("Altered versions of column family: " + columnDesc + " to: " + versions +
      " in table: " + tableName);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}
 
Example 19
Source File: HTableDescriptor.java    From hbase with Apache License 2.0 4 votes vote down vote up
public HTableDescriptor(final TableDescriptor desc) {
  this(new ModifyableTableDescriptor(desc.getTableName(), desc));
}
 
Example 20
Source File: IntegrationTestDDLMasterFailover.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
void perform() throws IOException {
  TableDescriptor selected = selectTable(disabledTables);
  if (selected == null) {
    return;
  }
  ColumnFamilyDescriptor columnDesc = selectFamily(selected);
  if (columnDesc == null){
    return;
  }

  Admin admin = connection.getAdmin();
  try {
    TableName tableName = selected.getTableName();
    // possible DataBlockEncoding ids
    DataBlockEncoding[] possibleIds = {DataBlockEncoding.NONE, DataBlockEncoding.PREFIX,
            DataBlockEncoding.DIFF, DataBlockEncoding.FAST_DIFF, DataBlockEncoding.ROW_INDEX_V1};
    short id = possibleIds[RandomUtils.nextInt(0, possibleIds.length)].getId();
    LOG.info("Altering encoding of column family: " + columnDesc + " to: " + id +
        " in table: " + tableName);

    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(columnDesc)
        .setDataBlockEncoding(DataBlockEncoding.getEncodingById(id))
        .build();
    TableDescriptor td = TableDescriptorBuilder.newBuilder(selected)
        .modifyColumnFamily(cfd)
        .build();
    admin.modifyTable(td);

    // assertion
    TableDescriptor freshTableDesc = admin.getDescriptor(tableName);
    ColumnFamilyDescriptor freshColumnDesc = freshTableDesc.getColumnFamily(columnDesc.getName());
    Assert.assertEquals("Encoding of column family: " + columnDesc + " was not altered",
        freshColumnDesc.getDataBlockEncoding().getId(), id);
    Assert.assertTrue(
      "After alter encoding of column family, Table: " + tableName + " is not disabled",
      admin.isTableDisabled(tableName));
    disabledTables.put(tableName, freshTableDesc);
    LOG.info("Altered encoding of column family: " + freshColumnDesc + " to: " + id +
      " in table: " + tableName);
  } catch (Exception e) {
    LOG.warn("Caught exception in action: " + this.getClass());
    throw e;
  } finally {
    admin.close();
  }
}