Package org.apache.hadoop.hbase
Class StripeCompactionsPerformanceEvaluation.SeqShardedDataGenerator
java.lang.Object
org.apache.hadoop.hbase.util.test.LoadTestDataGenerator
org.apache.hadoop.hbase.StripeCompactionsPerformanceEvaluation.SeqShardedDataGenerator
- Enclosing class:
- StripeCompactionsPerformanceEvaluation
public static class StripeCompactionsPerformanceEvaluation.SeqShardedDataGenerator
extends LoadTestDataGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[][]
private final int
private static final int
private static final int
Fields inherited from class org.apache.hadoop.hbase.util.test.LoadTestDataGenerator
args, INCREMENT, kvGenerator, MUTATE_INFO
-
Constructor Summary
ConstructorsConstructorDescriptionSeqShardedDataGenerator
(int minValueSize, int maxValueSize, int numPartitions) -
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.private String
getPrefix
(long i) 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
-
COLUMN_NAMES
-
PAD_TO
- See Also:
-
PREFIX_PAD_TO
- See Also:
-
numPartitions
-
-
Constructor Details
-
SeqShardedDataGenerator
-
-
Method Details
-
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.
-
getPrefix
-
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.
-