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 intprivate static final intprivate static final intFields 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 StringgetPrefix(long i) booleanverify(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[])booleanChecks 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:LoadTestDataGeneratorGenerates 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:
getDeterministicUniqueKeyin classLoadTestDataGenerator- Parameters:
keyBase- Base number for a key, such as a loop counter.
-
getPrefix
-
getColumnFamilies
Description copied from class:LoadTestDataGeneratorGets column families for the load test table.- Specified by:
getColumnFamiliesin classLoadTestDataGenerator- Returns:
- The array of byte[]s representing column family names.
-
generateColumnsForCf
Description copied from class:LoadTestDataGeneratorGenerates an applicable set of columns to be used for a particular key and family.- Specified by:
generateColumnsForCfin 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:LoadTestDataGeneratorGenerates a value to be used for a particular row/cf/column.- Specified by:
generateValuein 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:LoadTestDataGeneratorChecks that value for a rowKey/cf/column is valid if generated viaLoadTestDataGenerator.generateValue(byte[], byte[], byte[])- Specified by:
verifyin 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:LoadTestDataGeneratorChecks that columns for a rowKey and cf are valid if generated viaLoadTestDataGenerator.generateColumnsForCf(byte[], byte[])- Specified by:
verifyin 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.
-