public Table createTable(TableName tableName, byte[][] families, int numVersions, byte[] startKey,
    byte[] endKey, int numRegions) throws IOException {
    TableDescriptor desc = createTableDescriptor(tableName, families, numVersions);

    getAdmin().createTable(desc, startKey, endKey, numRegions);
    // 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.
@param tableName    the table name
@param families     the families
@param splitKeys    the splitkeys
@param replicaCount the region replica count
@return A Table instance for the created table.
@throws IOException throws IOException
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java