public static class MultiThreadedAction.DefaultDataGenerator extends LoadTestDataGenerator
HBaseTestingUtility.createPreSplitLoadTestTable(Configuration, TableName, byte[],
org.apache.hadoop.hbase.io.compress.Compression.Algorithm, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding)
Modifier and Type | Field and Description |
---|---|
private byte[][] |
columnFamilies |
private int |
maxColumnsPerKey |
private int |
minColumnsPerKey |
private Random |
random |
args, INCREMENT, kvGenerator, MUTATE_INFO
Constructor and Description |
---|
DefaultDataGenerator(byte[]... columnFamilies) |
DefaultDataGenerator(int minValueSize,
int maxValueSize,
int minColumnsPerKey,
int maxColumnsPerKey,
byte[]... columnFamilies) |
Modifier and Type | Method and Description |
---|---|
byte[][] |
generateColumnsForCf(byte[] rowKey,
byte[] cf)
Generates an applicable set of columns to be used for a particular key and family.
|
byte[] |
generateValue(byte[] rowKey,
byte[] cf,
byte[] column)
Generates a value to be used for a particular row/cf/column.
|
byte[][] |
getColumnFamilies()
Gets column families for the load test table.
|
byte[] |
getDeterministicUniqueKey(long keyBase)
Generates a deterministic, unique hashed row key from a number.
|
boolean |
verify(byte[] rowKey,
byte[] cf,
byte[] column,
byte[] value)
Checks that value for a rowKey/cf/column is valid if generated via
LoadTestDataGenerator.generateValue(byte[], byte[], byte[]) |
boolean |
verify(byte[] rowKey,
byte[] cf,
Set<byte[]> columnSet)
Checks that columns for a rowKey and cf are valid if generated via
LoadTestDataGenerator.generateColumnsForCf(byte[], byte[]) |
beforeGet, beforeMutate, generateData, getArgs, initialize
private byte[][] columnFamilies
private int minColumnsPerKey
private int maxColumnsPerKey
public DefaultDataGenerator(int minValueSize, int maxValueSize, int minColumnsPerKey, int maxColumnsPerKey, byte[]... columnFamilies)
public DefaultDataGenerator(byte[]... columnFamilies)
public byte[] getDeterministicUniqueKey(long keyBase)
LoadTestDataGenerator
getDeterministicUniqueKey
in class LoadTestDataGenerator
keyBase
- Base number for a key, such as a loop counter.public byte[][] getColumnFamilies()
LoadTestDataGenerator
getColumnFamilies
in class LoadTestDataGenerator
public byte[][] generateColumnsForCf(byte[] rowKey, byte[] cf)
LoadTestDataGenerator
generateColumnsForCf
in class LoadTestDataGenerator
rowKey
- The row key to generate for.cf
- The column family name to generate for.public byte[] generateValue(byte[] rowKey, byte[] cf, byte[] column)
LoadTestDataGenerator
generateValue
in class LoadTestDataGenerator
rowKey
- The row key to generate for.cf
- The column family name to generate for.column
- The column name to generate for.public boolean verify(byte[] rowKey, byte[] cf, byte[] column, byte[] value)
LoadTestDataGenerator
LoadTestDataGenerator.generateValue(byte[], byte[], byte[])
verify
in class LoadTestDataGenerator
rowKey
- The row key to verify for.cf
- The column family name to verify for.column
- The column name to verify for.value
- The value (for example, encountered by read).public boolean verify(byte[] rowKey, byte[] cf, Set<byte[]> columnSet)
LoadTestDataGenerator
LoadTestDataGenerator.generateColumnsForCf(byte[], byte[])
verify
in class LoadTestDataGenerator
rowKey
- The row key to verify for.cf
- The column family name to verify for.columnSet
- The column set (for example, encountered by read).Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.