Package org.apache.hadoop.hbase.io.hfile
Class RandomKeyValueUtil
java.lang.Object
org.apache.hadoop.hbase.io.hfile.RandomKeyValueUtil
These helper methods generate random byte[]'s data for KeyValues
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private static final int
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
randomFixedLengthValue
(Random rand, int valueLength) static org.apache.hadoop.hbase.KeyValue
randomKeyValue
(Random rand) static byte[]
randomOrderedFixedLengthKey
(Random rand, int i, int suffixLength) static byte[]
randomOrderedKey
(Random rand, int i) Generates a random key that is guaranteed to increase as the given index i increases.static final char
randomReadableChar
(Random rand) static byte[]
randomRowOrQualifier
(Random rand) static byte[]
randomValue
(Random rand)
-
Field Details
-
COLUMN_FAMILY_NAME
- See Also:
-
MIN_ROW_OR_QUALIFIER_LENGTH
- See Also:
-
MAX_ROW_OR_QUALIFIER_LENGTH
- See Also:
-
-
Constructor Details
-
RandomKeyValueUtil
public RandomKeyValueUtil()
-
-
Method Details
-
randomReadableChar
-
randomKeyValue
-
randomRowOrQualifier
-
randomValue
-
randomOrderedKey
Generates a random key that is guaranteed to increase as the given index i increases. The result consists of a prefix, which is a deterministic increasing function of i, and a random suffix.- Parameters:
rand
- random number generator to use- Returns:
- the random key
-
randomOrderedFixedLengthKey
-
randomFixedLengthValue
-