|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.test.LoadTestDataGenerator
public abstract class LoadTestDataGenerator
A generator of random data (keys/cfs/columns/values) for load testing. Contains LoadTestKVGenerator as a matter of convenience...
| Field Summary | |
|---|---|
static byte[] |
INCREMENT
|
protected LoadTestKVGenerator |
kvGenerator
|
static byte[] |
MUTATE_INFO
|
| Constructor Summary | |
|---|---|
LoadTestDataGenerator(int minValueSize,
int maxValueSize)
Initializes the object. |
|
| Method Summary | |
|---|---|
abstract byte[][] |
generateColumnsForCf(byte[] rowKey,
byte[] cf)
Generates an applicable set of columns to be used for a particular key and family. |
abstract byte[] |
generateValue(byte[] rowKey,
byte[] cf,
byte[] column)
Generates a value to be used for a particular row/cf/column. |
abstract byte[][] |
getColumnFamilies()
Gets column families for the load test table. |
abstract byte[] |
getDeterministicUniqueKey(long keyBase)
Generates a deterministic, unique hashed row key from a number. |
abstract boolean |
verify(byte[] rowKey,
byte[] cf,
byte[] column,
byte[] value)
Checks that value for a rowKey/cf/column is valid if generated via generateValue(byte[], byte[], byte[]) |
abstract boolean |
verify(byte[] rowKey,
byte[] cf,
Set<byte[]> columnSet)
Checks that columns for a rowKey and cf are valid if generated via generateColumnsForCf(byte[], byte[]) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final LoadTestKVGenerator kvGenerator
public static final byte[] MUTATE_INFO
public static final byte[] INCREMENT
| Constructor Detail |
|---|
public LoadTestDataGenerator(int minValueSize,
int maxValueSize)
minValueSize - minimum size of the value generated by
generateValue(byte[], byte[], byte[]).maxValueSize - maximum size of the value generated by
generateValue(byte[], byte[], byte[]).| Method Detail |
|---|
public abstract byte[] getDeterministicUniqueKey(long keyBase)
keyBase - Base number for a key, such as a loop counter.public abstract byte[][] getColumnFamilies()
public abstract byte[][] generateColumnsForCf(byte[] rowKey,
byte[] cf)
rowKey - The row key to generate for.cf - The column family name to generate for.
public abstract byte[] generateValue(byte[] rowKey,
byte[] cf,
byte[] column)
rowKey - The row key to generate for.cf - The column family name to generate for.column - The column name to generate for.
public abstract boolean verify(byte[] rowKey,
byte[] cf,
Set<byte[]> columnSet)
generateColumnsForCf(byte[], byte[])
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 abstract boolean verify(byte[] rowKey,
byte[] cf,
byte[] column,
byte[] value)
generateValue(byte[], byte[], byte[])
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).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||