public class PerfTestCompactionPolicies extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Random |
random
The random number generator.
|
| Constructor and Description |
|---|
PerfTestCompactionPolicies(Class<? extends CompactionPolicy> cpClass,
Class<? extends StoreFileListGenerator> fileGenClass,
int inMmax,
int inMin,
float inRatio)
Test the perf of a CompactionPolicy with settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected StoreFile |
createMockStoreFile(long size) |
protected StoreFile |
createMockStoreFile(long sizeInBytes,
long seqId) |
protected StoreFile |
createMockStoreFileBytes(long size) |
protected List<StoreFile> |
createStoreFileList(int[] fs) |
static Collection<Object[]> |
data() |
void |
testSelection() |
protected Random random
public PerfTestCompactionPolicies(Class<? extends CompactionPolicy> cpClass, Class<? extends StoreFileListGenerator> fileGenClass, int inMmax, int inMin, float inRatio) throws IllegalAccessException, InstantiationException
cpClass - The compaction policy to testinMmax - The maximum number of file to compactinMin - The min number of files to compactinRatio - The ratio that files must be under to be compacted.IllegalAccessExceptionInstantiationExceptionpublic static Collection<Object[]> data()
protected StoreFile createMockStoreFile(long size)
protected StoreFile createMockStoreFileBytes(long size)
protected StoreFile createMockStoreFile(long sizeInBytes, long seqId)