public class PerfTestCompactionPolicies
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Random |
random
The random number generator.
|
| Constructor and Description |
|---|
PerfTestCompactionPolicies(java.lang.Class<? extends CompactionPolicy> cpClass,
java.lang.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 java.util.List<StoreFile> |
createStoreFileList(int[] fs) |
static java.util.Collection<java.lang.Object[]> |
data() |
void |
testSelection() |
public PerfTestCompactionPolicies(java.lang.Class<? extends CompactionPolicy> cpClass, java.lang.Class<? extends StoreFileListGenerator> fileGenClass, int inMmax, int inMin, float inRatio) throws java.lang.IllegalAccessException, java.lang.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.java.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic static java.util.Collection<java.lang.Object[]> data()
public final void testSelection()
throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<StoreFile> createStoreFileList(int[] fs)
protected StoreFile createMockStoreFile(long size)
protected StoreFile createMockStoreFileBytes(long size)
protected StoreFile createMockStoreFile(long sizeInBytes, long seqId)