protected void prepareForLoadTest() throws IOException {
    LOG.info(
      "Starting load test: dataBlockEncoding=" + dataBlockEncoding + ", isMultiPut=" + isMultiPut);
    numKeys = numKeys();
    Admin admin = TEST_UTIL.getAdmin();
    while (
      admin.getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS)).getLiveServerMetrics().size()
          < NUM_RS
    ) {
      LOG.info("Sleeping until " + NUM_RS + " RSs are online");
      Threads.sleepWithoutInterrupt(1000);
    }
    admin.close();

    TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(TABLE).build();
    ColumnFamilyDescriptor familyDescriptor = ColumnFamilyDescriptorBuilder.newBuilder(CF)
      .setCompressionType(compression).setDataBlockEncoding(dataBlockEncoding).build();
    createPreSplitLoadTestTable(tableDescriptor, familyDescriptor);

    LoadTestDataGenerator dataGen = new MultiThreadedAction.DefaultDataGenerator(CF);
    writerThreads = prepareWriterThreads(dataGen, conf, TABLE);
    readerThreads = prepareReaderThreads(dataGen, conf, TABLE, 100);
  }
A write/read/verify load test on a mini HBase cluster. Tests reading and then writing.
hbase-diagnostics/src/test/java/org/apache/hadoop/hbase/util/TestMiniClusterLoadSequential.java