protected static TableDescriptor getTableDescriptor(TestOptions opts) {
    TableDescriptorBuilder builder =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(opts.tableName));

    for (int family = 0; family < opts.families; family++) {
      byte[] familyName = Bytes.toBytes(FAMILY_NAME_BASE + family);
      ColumnFamilyDescriptorBuilder cfBuilder =
        ColumnFamilyDescriptorBuilder.newBuilder(familyName);
      cfBuilder.setDataBlockEncoding(opts.blockEncoding);
      cfBuilder.setCompressionType(opts.compression);
      cfBuilder.setEncryptionType(opts.encryption);
      cfBuilder.setBloomFilterType(opts.bloomType);
      cfBuilder.setBlocksize(opts.blockSize);
      if (opts.inMemoryCF) {
        cfBuilder.setInMemory(true);
      }
      cfBuilder.setInMemoryCompaction(opts.inMemoryCompaction);
      builder.setColumnFamily(cfBuilder.build());
    }
    if (opts.replicas != DEFAULT_OPTS.replicas) {
      builder.setRegionReplication(opts.replicas);
    }
    if (opts.splitPolicy != null && !opts.splitPolicy.equals(DEFAULT_OPTS.splitPolicy)) {
      builder.setRegionSplitPolicyClassName(opts.splitPolicy);
    }
    return builder.build();
  }
Create an HTableDescriptor from provided TestOptions.
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/PerformanceEvaluation.java