public class EverythingCompactionStrategy extends CompactionStrategy
| Constructor and Description |
|---|
EverythingCompactionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
CompactionPlan |
getCompactionPlan(MajorCompactionRequest request)
Get the plan for compacting a tablets files.
|
boolean |
shouldCompact(MajorCompactionRequest request)
Determine if this tablet is eligible for a major compaction.
|
gatherInformation, initpublic boolean shouldCompact(MajorCompactionRequest request) throws IOException
CompactionStrategyCompactionStrategy.gatherInformation(MajorCompactionRequest) and
CompactionStrategy.getCompactionPlan(MajorCompactionRequest)) that it does not need to. Any state stored during shouldCompact will no longer exist when
CompactionStrategy.gatherInformation(MajorCompactionRequest) and CompactionStrategy.getCompactionPlan(MajorCompactionRequest) are called.
Called while holding the tablet lock, so it should not be doing any blocking.
Since no blocking should be done in this method, then its unexpected that this method will throw IOException. However since its in the API, it can not be easily removed.
shouldCompact in class CompactionStrategyIOExceptionpublic CompactionPlan getCompactionPlan(MajorCompactionRequest request) throws IOException
CompactionStrategySince no blocking should be done in this method, then its unexpected that this method will throw IOException. However since its in the API, it can not be easily removed.
getCompactionPlan in class CompactionStrategyrequest - basic details about the tabletIOExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.