Class SizeLimitCompactionStrategy
- java.lang.Object
-
- org.apache.accumulo.tserver.compaction.CompactionStrategy
-
- org.apache.accumulo.tserver.compaction.DefaultCompactionStrategy
-
- org.apache.accumulo.tserver.compaction.SizeLimitCompactionStrategy
-
@Deprecated(since="2.1.0", forRemoval=true) public class SizeLimitCompactionStrategy extends DefaultCompactionStrategy
Deprecated, for removal: This API element is subject to removal in a future version.BasicCompactionStrategy
offer the same functionality as this class and more.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SIZE_LIMIT_OPT
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors Constructor Description SizeLimitCompactionStrategy()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
gatherInformation(MajorCompactionRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Called prior to obtaining the tablet lock, useful for examining metadata or indexes.CompactionPlan
getCompactionPlan(MajorCompactionRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Get the plan for compacting a tablets files.void
init(Map<String,String> options)
Deprecated, for removal: This API element is subject to removal in a future version.The settings for the compaction strategy pulled from zookeeper.boolean
shouldCompact(MajorCompactionRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Determine if this tablet is eligible for a major compaction.
-
-
-
Field Detail
-
SIZE_LIMIT_OPT
public static final String SIZE_LIMIT_OPT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Map<String,String> options)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:CompactionStrategy
The settings for the compaction strategy pulled from zookeeper. Thetable.compacations.major.strategy.opts
part of the setting will be removed.- Overrides:
init
in classCompactionStrategy
-
shouldCompact
public boolean shouldCompact(MajorCompactionRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:CompactionStrategy
Determine if this tablet is eligible for a major compaction. It's ok if it later determines (throughCompactionStrategy.gatherInformation(MajorCompactionRequest)
andCompactionStrategy.getCompactionPlan(MajorCompactionRequest)
) that it does not need to. Any state stored during shouldCompact will no longer exist whenCompactionStrategy.gatherInformation(MajorCompactionRequest)
andCompactionStrategy.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.
- Overrides:
shouldCompact
in classDefaultCompactionStrategy
-
gatherInformation
public void gatherInformation(MajorCompactionRequest request) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:CompactionStrategy
Called prior to obtaining the tablet lock, useful for examining metadata or indexes. State collected during this method will be available during the call theCompactionStrategy.getCompactionPlan(MajorCompactionRequest)
.- Overrides:
gatherInformation
in classCompactionStrategy
- Parameters:
request
- basic details about the tablet- Throws:
IOException
-
getCompactionPlan
public CompactionPlan getCompactionPlan(MajorCompactionRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:CompactionStrategy
Get the plan for compacting a tablets files. 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.
- Overrides:
getCompactionPlan
in classDefaultCompactionStrategy
- Parameters:
request
- basic details about the tablet- Returns:
- the plan for a major compaction, or null to cancel the compaction.
-
-