public class PerfTestCompactionPolicies extends MockStoreFileGenerator
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy |
cp |
private Class<? extends StoreFileListGenerator> |
fileGenClass |
private StoreFileListGenerator |
generator |
private int |
max |
private int |
min |
private float |
ratio |
private org.apache.hadoop.hbase.regionserver.HStore |
store |
private long |
written |
random
Constructor and Description |
---|
PerfTestCompactionPolicies(Class<? extends org.apache.hadoop.hbase.regionserver.compactions.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 |
---|---|
private org.apache.hadoop.hbase.regionserver.HStore |
createMockStore() |
static Collection<Object[]> |
data() |
private List<org.apache.hadoop.hbase.regionserver.HStoreFile> |
runIteration(List<org.apache.hadoop.hbase.regionserver.HStoreFile> startingStoreFiles) |
void |
testSelection() |
createMockStoreFile, createMockStoreFile, createMockStoreFileBytes, createStoreFileList
private final org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy cp
private final StoreFileListGenerator generator
private final org.apache.hadoop.hbase.regionserver.HStore store
private Class<? extends StoreFileListGenerator> fileGenClass
private final int max
private final int min
private final float ratio
private long written
public PerfTestCompactionPolicies(Class<? extends org.apache.hadoop.hbase.regionserver.compactions.CompactionPolicy> cpClass, Class<? extends StoreFileListGenerator> fileGenClass, int inMmax, int inMin, float inRatio) throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException
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.IllegalAccessException
InstantiationException
NoSuchMethodException
InvocationTargetException
public static Collection<Object[]> data()
public final void testSelection() throws Exception
Exception
private List<org.apache.hadoop.hbase.regionserver.HStoreFile> runIteration(List<org.apache.hadoop.hbase.regionserver.HStoreFile> startingStoreFiles) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore createMockStore()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.