public static KeyValue randomKeyValue(Random rand) {
    return new KeyValue(randomRowOrQualifier(rand), Bytes.toBytes(COLUMN_FAMILY_NAME),
      randomRowOrQualifier(rand), randomValue(rand));
  }
These helper methods generate random byte[]'s data for KeyValues
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/RandomKeyValueUtil.java