TABLE_NAME, new HColumnDescriptor(CF_NAME)
.setMaxVersions(MAX_VERSIONS)
.setDataBlockEncoding(encoding)
.setEncodeOnDisk(encodeOnDisk)
);
LoadTestKVGenerator dataGenerator = new LoadTestKVGenerator(
MIN_VALUE_SIZE, MAX_VALUE_SIZE);
// Write
for (int i = 0; i < NUM_ROWS; ++i) {
byte[] key = MultiThreadedWriter.longToByteArrayKey(i);
for (int j = 0; j < NUM_COLS_PER_ROW; ++j) {
Put put = new Put(key);
String colAsStr = String.valueOf(j);
byte[] value = dataGenerator.generateRandomSizeValue(i, colAsStr);
put.add(CF_BYTES, Bytes.toBytes(colAsStr), value);
region.put(put);
}
if (i % NUM_ROWS_PER_FLUSH == 0) {
region.flushcache();