Class PerfTestCompactionPolicies
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.MockStoreFileGenerator
org.apache.hadoop.hbase.regionserver.compactions.PerfTestCompactionPolicies
@Tag("org.apache.hadoop.hbase.testclassification.RegionServerTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class PerfTestCompactionPolicies
extends MockStoreFileGenerator
This test compares compaction policy behavior with different generated store file lists and
settings. It can be run explicitly; e.g. mvn test -Dtest=PerfTestCompactionPolicies
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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 Stream<org.junit.jupiter.params.provider.Arguments>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
-
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 testfileGenClass- The store file list generator to test withinMmax- The maximum number of files to compactinMin- The min number of files to compactinRatio- The ratio that files must be under to be compacted.- Throws:
IllegalAccessExceptionInstantiationExceptionNoSuchMethodExceptionInvocationTargetException
-
-
Method Details
-
parameters
-
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
-