private static class IntegrationTestLazyCfLoading.DataGenerator extends LoadTestDataGenerator
Modifier and Type | Field and Description |
---|---|
static long |
ACCEPTED_VALUE |
private static Map<byte[],byte[][]> |
columnMap |
static byte[] |
ESSENTIAL_CF |
private AtomicLong |
expectedNumberOfKeys |
static byte[] |
FILTER_COLUMN |
static byte[] |
JOINED_CF1 |
static byte[] |
JOINED_CF2 |
private static int |
MAX_DATA_SIZE |
private static int |
MIN_DATA_SIZE |
private AtomicLong |
totalNumberOfKeys |
static byte[] |
VALUE_COLUMN |
args, INCREMENT, kvGenerator, MUTATE_INFO
Constructor and Description |
---|
DataGenerator() |
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.
|
long |
getExpectedNumberOfKeys() |
org.apache.hadoop.hbase.filter.Filter |
getScanFilter() |
long |
getTotalNumberOfKeys() |
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 static final int MIN_DATA_SIZE
private static final int MAX_DATA_SIZE
public static final byte[] ESSENTIAL_CF
public static final byte[] JOINED_CF1
public static final byte[] JOINED_CF2
public static final byte[] FILTER_COLUMN
public static final byte[] VALUE_COLUMN
public static final long ACCEPTED_VALUE
private final AtomicLong expectedNumberOfKeys
private final AtomicLong totalNumberOfKeys
public DataGenerator()
public long getExpectedNumberOfKeys()
public long getTotalNumberOfKeys()
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).public org.apache.hadoop.hbase.filter.Filter getScanFilter()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.