Package org.apache.hadoop.hbase.io.hfile
Class KVGenerator
java.lang.Object
org.apache.hadoop.hbase.io.hfile.KVGenerator
Generate random <key, value> pairs.
Copied from hadoop-3315 tfile. Remove after tfile is committed and use the tfile version of this class instead.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final byte[][]
private final org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG
private org.apache.hadoop.io.BytesWritable
private static final int
private final byte[]
private final Random
private final boolean
private final org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG
-
Constructor Summary
ConstructorDescriptionKVGenerator
(Random random, boolean sorted, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG keyLenRNG, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG valLenRNG, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG wordLenRNG, int dictSize) -
Method Summary
-
Field Details
-
random
-
dict
-
sorted
-
keyLenRNG
-
valLenRNG
-
lastKey
-
MIN_KEY_LEN
- See Also:
-
prefix
-
-
Constructor Details
-
KVGenerator
public KVGenerator(Random random, boolean sorted, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG keyLenRNG, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG valLenRNG, org.apache.hadoop.hbase.util.RandomDistribution.DiscreteRNG wordLenRNG, int dictSize)
-
-
Method Details
-
fillKey
-
fillValue
-
incrementPrefix
-
next
public void next(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, boolean dupKey)
-