class KVGenerator extends Object
Copied from hadoop-3315 tfile. Remove after tfile is committed and use the tfile version of this class instead.
Modifier and Type | Field and Description |
---|---|
private byte[][] |
dict |
private RandomDistribution.DiscreteRNG |
keyLenRNG |
private org.apache.hadoop.io.BytesWritable |
lastKey |
private static int |
MIN_KEY_LEN |
private byte[] |
prefix |
private Random |
random |
private boolean |
sorted |
private RandomDistribution.DiscreteRNG |
valLenRNG |
Constructor and Description |
---|
KVGenerator(Random random,
boolean sorted,
RandomDistribution.DiscreteRNG keyLenRNG,
RandomDistribution.DiscreteRNG valLenRNG,
RandomDistribution.DiscreteRNG wordLenRNG,
int dictSize) |
Modifier and Type | Method and Description |
---|---|
private void |
fillKey(org.apache.hadoop.io.BytesWritable o) |
private void |
fillValue(org.apache.hadoop.io.BytesWritable o) |
private void |
incrementPrefix() |
void |
next(org.apache.hadoop.io.BytesWritable key,
org.apache.hadoop.io.BytesWritable value,
boolean dupKey) |
private final byte[][] dict
private final boolean sorted
private final RandomDistribution.DiscreteRNG keyLenRNG
private final RandomDistribution.DiscreteRNG valLenRNG
private org.apache.hadoop.io.BytesWritable lastKey
private static final int MIN_KEY_LEN
private final byte[] prefix
public KVGenerator(Random random, boolean sorted, RandomDistribution.DiscreteRNG keyLenRNG, RandomDistribution.DiscreteRNG valLenRNG, RandomDistribution.DiscreteRNG wordLenRNG, int dictSize)
private void fillKey(org.apache.hadoop.io.BytesWritable o)
private void fillValue(org.apache.hadoop.io.BytesWritable o)
private void incrementPrefix()
public void next(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, boolean dupKey)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.