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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate final org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicyprivate Class<? extends StoreFileListGenerator>private final StoreFileListGeneratorprivate final intprivate final intprivate final floatprivate final org.apache.hadoop.hbase.regionserver.HStoreprivate long -
Constructor Summary
ConstructorsConstructorDescriptionPerfTestCompactionPolicies(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.HStorestatic Collection<Object[]>data()private List<org.apache.hadoop.hbase.regionserver.HStoreFile>runIteration(List<org.apache.hadoop.hbase.regionserver.HStoreFile> startingStoreFiles) final voidMethods 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:
IllegalAccessExceptionInstantiationExceptionNoSuchMethodExceptionInvocationTargetException
-
-
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
-