public Table createTable(TableName tableName, byte[][] families, int[] numVersions)
    throws IOException {
    TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
    int i = 0;
    for (byte[] family : families) {
      ColumnFamilyDescriptorBuilder cfBuilder =
        ColumnFamilyDescriptorBuilder.newBuilder(family).setMaxVersions(numVersions[i]);
      if (isNewVersionBehaviorEnabled()) {
        cfBuilder.setNewVersionBehavior(true);
      }
      builder.setColumnFamily(cfBuilder.build());
      i++;
    }
    getAdmin().createTable(builder.build());
    // HBaseAdmin only waits for regions to appear in hbase:meta we should wait until they are
    // assigned
    waitUntilAllRegionsAssigned(tableName);
    return getConnection().getTable(tableName);
  }
Create a table.
@return A Table instance for the created table.
hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java