|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.test.LoadTestKVGenerator
@InterfaceAudience.Private public class LoadTestKVGenerator
A generator of random keys and values for load testing. Keys are generated by converting numeric indexes to strings and prefixing them with an MD5 hash. Values are generated by selecting value size in the configured range and generating a pseudo-random sequence of bytes seeded by key, column qualifier, and value size.
Constructor Summary | |
---|---|
LoadTestKVGenerator(int minValueSize,
int maxValueSize)
|
Method Summary | |
---|---|
byte[] |
generateRandomSizeValue(byte[]... seedStrings)
Generates a value for the given key index and column qualifier. |
static String |
md5PrefixedKey(long key)
Converts the given key to string, and prefixes it with the MD5 hash of the index's string representation. |
static boolean |
verify(byte[] value,
byte[]... seedStrings)
Verifies that the given byte array is the same as what would be generated for the given seed strings (row/cf/column/...). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoadTestKVGenerator(int minValueSize, int maxValueSize)
Method Detail |
---|
public static boolean verify(byte[] value, byte[]... seedStrings)
public static String md5PrefixedKey(long key)
public byte[] generateRandomSizeValue(byte[]... seedStrings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |