Class PerfTestCompactionPolicies
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.MockStoreFileGenerator
org.apache.hadoop.hbase.regionserver.compactions.PerfTestCompactionPolicies
This is not a unit test. It is not run as part of the general unit test suite. It is for
comparing compaction policies. You must run it explicitly; e.g. mvn test
-Dtest=PerfTestCompactionPolicies
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private final org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy
private Class<? extends StoreFileListGenerator>
private final StoreFileListGenerator
private final int
private final int
private final float
private final org.apache.hadoop.hbase.regionserver.HStore
private long
-
Constructor Summary
ConstructorDescriptionPerfTestCompactionPolicies
(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. -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.regionserver.HStore
static Collection<Object[]>
data()
private List<org.apache.hadoop.hbase.regionserver.HStoreFile>
runIteration
(List<org.apache.hadoop.hbase.regionserver.HStoreFile> startingStoreFiles) final void
Methods inherited from class org.apache.hadoop.hbase.regionserver.compactions.MockStoreFileGenerator
createMockStoreFile, createMockStoreFile, createMockStoreFileBytes, createStoreFileList
-
Field Details
-
CLASS_RULE
-
cp
-
generator
-
store
-
fileGenClass
-
max
-
min
-
ratio
-
written
-
-
Constructor Details
-
PerfTestCompactionPolicies
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 Test the perf of a CompactionPolicy with settings.- Parameters:
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.- Throws:
IllegalAccessException
InstantiationException
NoSuchMethodException
InvocationTargetException
-
-
Method Details
-
data
-
testSelection
- Throws:
Exception
-
runIteration
private List<org.apache.hadoop.hbase.regionserver.HStoreFile> runIteration(List<org.apache.hadoop.hbase.regionserver.HStoreFile> startingStoreFiles) throws IOException - Throws:
IOException
-
createMockStore
-