private void setEncodingConf(DataBlockEncoding encoding, boolean onlineChange) throws Exception {
    LOG.debug("Setting CF encoding to " + encoding + " (ordinal=" + encoding.ordinal()
      + "), onlineChange=" + onlineChange);
    columnFamilyDescriptorBuilder.setDataBlockEncoding(encoding);
    try (Admin admin = TEST_UTIL.getConnection().getAdmin()) {
      if (!onlineChange) {
        admin.disableTable(tableName);
      }
      admin.modifyColumnFamily(tableName, columnFamilyDescriptorBuilder.build());
      if (!onlineChange) {
        admin.enableTable(tableName);
      }
    }
    // This is a unit test, not integration test. So let's
    // wait for regions out of transition. Otherwise, for online
    // encoding change, verification phase may be flaky because
    // regions could be still in transition.
    TEST_UTIL.waitUntilNoRegionsInTransition(TIMEOUT_MS);
  }
A zero-based index of the current batch of test data being written
hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java