@InterfaceAudience.Private public class RedundantKVGenerator extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
RedundantKVGenerator.ExtendedOffheapKeyValue |
Modifier and Type | Field and Description |
---|---|
private int |
averagePrefixLength |
private int |
averageQualifierLength |
private int |
averageSuffixLength |
private int |
baseTimestampDivide |
private float |
chanceForSameQualifier |
private float |
chanceForSimilarQualifier |
private float |
chanceForZeroValue |
private int |
columnFamilyLength |
private byte[] |
commonPrefix |
(package private) static int |
DEFAULT_AVERAGE_PREFIX_LENGTH |
(package private) static int |
DEFAULT_AVERAGE_QUALIFIER_LENGTH |
(package private) static int |
DEFAULT_AVERAGE_SUFFIX_LENGTH |
(package private) static int |
DEFAULT_BASE_TIMESTAMP_DIVIDE |
(package private) static float |
DEFAULT_CHANCE_FOR_SAME_QUALIFIER |
(package private) static float |
DEFAULT_CHANCE_FOR_SIMILIAR_QUALIFIER |
(package private) static float |
DEFAULT_CHANCE_FOR_ZERO_VALUE |
(package private) static int |
DEFAULT_COLUMN_FAMILY_LENGTH |
(package private) static byte[] |
DEFAULT_COMMON_PREFIX |
(package private) static int |
DEFAULT_NUMBER_OF_ROW |
(package private) static int |
DEFAULT_NUMBER_OF_ROW_PREFIXES |
(package private) static int |
DEFAULT_PREFIX_LENGTH_VARIANCE |
(package private) static int |
DEFAULT_QUALIFIER_LENGTH_VARIANCE |
(package private) static int |
DEFAULT_SUFFIX_LENGTH_VARIANCE |
(package private) static int |
DEFAULT_TIMESTAMP_DIFF_SIZE |
(package private) static int |
DEFAULT_VALUE_LENGTH |
private byte[] |
family |
private int |
numberOfRowPrefixes |
private int |
numberOfRows |
private int |
prefixLengthVariance |
private int |
qualifierLengthVariance |
private Random |
randomizer
Used to generate dataset
|
private int |
suffixLengthVariance |
private int |
timestampDiffSize |
private int |
valueLength |
Constructor and Description |
---|
RedundantKVGenerator()
Default constructor, assumes all parameters from class constants.
|
RedundantKVGenerator(Random randomizer,
int numberOfRowPrefixes,
int averagePrefixLength,
int prefixLengthVariance,
int averageSuffixLength,
int suffixLengthVariance,
int numberOfRows,
float chanceForSameQualifier,
float chanceForSimiliarQualifier,
int averageQualifierLength,
int qualifierLengthVariance,
int columnFamilyLength,
int valueLength,
float chanceForZeroValue,
int baseTimestampDivide,
int timestampDiffSize)
Various configuration options for generating key values
|
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
convertKvToByteBuffer(List<org.apache.hadoop.hbase.KeyValue> keyValues,
boolean includesMemstoreTS)
Convert list of KeyValues to byte buffer.
|
private List<byte[]> |
generateRows() |
List<org.apache.hadoop.hbase.Cell> |
generateTestExtendedOffheapKeyValues(int howMany,
boolean useTags)
Generate test data useful to test encoders.
|
List<org.apache.hadoop.hbase.KeyValue> |
generateTestKeyValues(int howMany)
Generate test data useful to test encoders.
|
List<org.apache.hadoop.hbase.KeyValue> |
generateTestKeyValues(int howMany,
boolean useTags)
Generate test data useful to test encoders.
|
RedundantKVGenerator |
setFamily(byte[] family) |
static byte[] DEFAULT_COMMON_PREFIX
static int DEFAULT_NUMBER_OF_ROW_PREFIXES
static int DEFAULT_AVERAGE_PREFIX_LENGTH
static int DEFAULT_PREFIX_LENGTH_VARIANCE
static int DEFAULT_AVERAGE_SUFFIX_LENGTH
static int DEFAULT_SUFFIX_LENGTH_VARIANCE
static int DEFAULT_NUMBER_OF_ROW
static float DEFAULT_CHANCE_FOR_SAME_QUALIFIER
static float DEFAULT_CHANCE_FOR_SIMILIAR_QUALIFIER
static int DEFAULT_AVERAGE_QUALIFIER_LENGTH
static int DEFAULT_QUALIFIER_LENGTH_VARIANCE
static int DEFAULT_COLUMN_FAMILY_LENGTH
static int DEFAULT_VALUE_LENGTH
static float DEFAULT_CHANCE_FOR_ZERO_VALUE
static int DEFAULT_BASE_TIMESTAMP_DIVIDE
static int DEFAULT_TIMESTAMP_DIFF_SIZE
private Random randomizer
private byte[] commonPrefix
private int numberOfRowPrefixes
private int averagePrefixLength
private int prefixLengthVariance
private int averageSuffixLength
private int suffixLengthVariance
private int numberOfRows
private byte[] family
private float chanceForSameQualifier
private float chanceForSimilarQualifier
private int averageQualifierLength
private int qualifierLengthVariance
private int columnFamilyLength
private int valueLength
private float chanceForZeroValue
private int baseTimestampDivide
private int timestampDiffSize
public RedundantKVGenerator()
public RedundantKVGenerator(Random randomizer, int numberOfRowPrefixes, int averagePrefixLength, int prefixLengthVariance, int averageSuffixLength, int suffixLengthVariance, int numberOfRows, float chanceForSameQualifier, float chanceForSimiliarQualifier, int averageQualifierLength, int qualifierLengthVariance, int columnFamilyLength, int valueLength, float chanceForZeroValue, int baseTimestampDivide, int timestampDiffSize)
randomizer
- pick things by randomprivate List<byte[]> generateRows()
public List<org.apache.hadoop.hbase.KeyValue> generateTestKeyValues(int howMany)
howMany
- How many Key values should be generated.public List<org.apache.hadoop.hbase.KeyValue> generateTestKeyValues(int howMany, boolean useTags)
howMany
- How many Key values should be generated.public List<org.apache.hadoop.hbase.Cell> generateTestExtendedOffheapKeyValues(int howMany, boolean useTags)
howMany
- How many Key values should be generated.public static ByteBuffer convertKvToByteBuffer(List<org.apache.hadoop.hbase.KeyValue> keyValues, boolean includesMemstoreTS)
keyValues
- list of KeyValues to be converted.public RedundantKVGenerator setFamily(byte[] family)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.