Package org.apache.hadoop.hbase
Class IntegrationTestLazyCfLoading.DataGenerator
java.lang.Object
org.apache.hadoop.hbase.util.test.LoadTestDataGenerator
org.apache.hadoop.hbase.IntegrationTestLazyCfLoading.DataGenerator
- Enclosing class:
- IntegrationTestLazyCfLoading
Custom LoadTestDataGenerator. Uses key generation and verification from LoadTestKVGenerator.
Creates 3 column families; one with an integer column to filter on, the 2nd one with an integer
column that matches the first integer column (for test-specific verification), and byte[] value
that is used for general verification; and the third one with just the value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
private static final Map<byte[],
byte[][]> static final byte[]
private final AtomicLong
static final byte[]
static final byte[]
static final byte[]
private static final int
private static final int
private final AtomicLong
static final byte[]
Fields inherited from class org.apache.hadoop.hbase.util.test.LoadTestDataGenerator
args, INCREMENT, kvGenerator, MUTATE_INFO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[][]
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[][]
Gets column families for the load test table.byte[]
getDeterministicUniqueKey
(long keyBase) Generates a deterministic, unique hashed row key from a number.long
org.apache.hadoop.hbase.filter.Filter
long
boolean
verify
(byte[] rowKey, byte[] cf, byte[] column, byte[] value) Checks that value for a rowKey/cf/column is valid if generated viaLoadTestDataGenerator.generateValue(byte[], byte[], byte[])
boolean
Checks that columns for a rowKey and cf are valid if generated viaLoadTestDataGenerator.generateColumnsForCf(byte[], byte[])
Methods inherited from class org.apache.hadoop.hbase.util.test.LoadTestDataGenerator
beforeGet, beforeMutate, generateData, getArgs, initialize
-
Field Details
-
MIN_DATA_SIZE
- See Also:
-
MAX_DATA_SIZE
- See Also:
-
ESSENTIAL_CF
-
JOINED_CF1
-
JOINED_CF2
-
FILTER_COLUMN
-
VALUE_COLUMN
-
ACCEPTED_VALUE
- See Also:
-
columnMap
-
expectedNumberOfKeys
-
totalNumberOfKeys
-
-
Constructor Details
-
DataGenerator
public DataGenerator()
-
-
Method Details
-
getExpectedNumberOfKeys
-
getTotalNumberOfKeys
-
getDeterministicUniqueKey
Description copied from class:LoadTestDataGenerator
Generates a deterministic, unique hashed row key from a number. That way, the user can keep track of numbers, without messing with byte array and ensuring key distribution.- Specified by:
getDeterministicUniqueKey
in classLoadTestDataGenerator
- Parameters:
keyBase
- Base number for a key, such as a loop counter.
-
getColumnFamilies
Description copied from class:LoadTestDataGenerator
Gets column families for the load test table.- Specified by:
getColumnFamilies
in classLoadTestDataGenerator
- Returns:
- The array of byte[]s representing column family names.
-
generateColumnsForCf
Description copied from class:LoadTestDataGenerator
Generates an applicable set of columns to be used for a particular key and family.- Specified by:
generateColumnsForCf
in classLoadTestDataGenerator
- Parameters:
rowKey
- The row key to generate for.cf
- The column family name to generate for.- Returns:
- The array of byte[]s representing column names.
-
generateValue
Description copied from class:LoadTestDataGenerator
Generates a value to be used for a particular row/cf/column.- Specified by:
generateValue
in classLoadTestDataGenerator
- Parameters:
rowKey
- The row key to generate for.cf
- The column family name to generate for.column
- The column name to generate for.- Returns:
- The value to use.
-
verify
Description copied from class:LoadTestDataGenerator
Checks that value for a rowKey/cf/column is valid if generated viaLoadTestDataGenerator.generateValue(byte[], byte[], byte[])
- Specified by:
verify
in classLoadTestDataGenerator
- Parameters:
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).- Returns:
- True iff valid.
-
verify
Description copied from class:LoadTestDataGenerator
Checks that columns for a rowKey and cf are valid if generated viaLoadTestDataGenerator.generateColumnsForCf(byte[], byte[])
- Specified by:
verify
in classLoadTestDataGenerator
- Parameters:
rowKey
- The row key to verify for.cf
- The column family name to verify for.columnSet
- The column set (for example, encountered by read).- Returns:
- True iff valid.
-
getScanFilter
-