private void doPut(Table table, long memstoreFlushSize) throws IOException, InterruptedException {
    Region region = getRegionWithName(table.getName()).getFirst();
    // cf1 4B per row, cf2 40B per row and cf3 400B per row
    byte[] qf = Bytes.toBytes("qf");
    for (int i = 0; i < 10000; i++) {
      Put put = new Put(Bytes.toBytes("row-" + i));
      byte[] value1 = new byte[100];
      Bytes.random(value1);
      put.addColumn(FAMILY1, qf, value1);
      byte[] value2 = new byte[200];
      Bytes.random(value2);
      put.addColumn(FAMILY2, qf, value2);
      byte[] value3 = new byte[400];
      Bytes.random(value3);
      put.addColumn(FAMILY3, qf, value3);
      table.put(put);
      // slow down to let regionserver flush region.
      while (region.getMemStoreHeapSize() > memstoreFlushSize) {
        Thread.sleep(100);
      }
    }
  }
When a log roll is about to happen, we do a flush of the regions who will be affected by the
log roll. These flushes cannot be a selective flushes, otherwise we cannot roll the logs. This
test ensures that we do a full-flush in that scenario.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java