Class TooManyDeletesSelector
- java.lang.Object
-
- org.apache.accumulo.core.client.admin.compaction.TooManyDeletesSelector
-
- All Implemented Interfaces:
CompactionSelector
public class TooManyDeletesSelector extends Object implements CompactionSelector
This compaction selector works in concert with theDeletesSummarizer
. Using the statistics from DeleteSummarizer this strategy will compact all files in a table when the number of deletes/non-deletes exceeds a threshold.This strategy has two options. First the "threshold" option allows setting the point at which a compaction will be triggered. This options defaults to ".25" and must be in the range (0.0, 1.0]. The second option is "proceed_zero_no_summary" which determines if the strategy should proceed when a bulk imported file has no summary information.
If the delete summarizer was configured on a table that already had files, then those files will have not summary information. This strategy can still proceed in this situation. It will fall back to using Accumulo's estimated entries per file in this case. For the files without summary information the estimated number of deletes will be zero. This fall back method will underestimate deletes which will not lead to false positives, except for the case of bulk imported files. Accumulo estimates that bulk imported files have zero entries. The second option "proceed_zero_no_summary" determines if this strategy should proceed when it sees bulk imported files that do not have summary data. This option defaults to "false".
Bulk files can be generated with summary information by calling
RFile.WriterOptions.withSummarizers(SummarizerConfiguration...)
When using this feature, its important to ensure summary cache is on and the summaries fit in the cache.
- Since:
- 2.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.admin.compaction.CompactionSelector
CompactionSelector.InitParameters, CompactionSelector.Selection, CompactionSelector.SelectionParameters
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROCEED_ZERO_NO_SUMMARY_OPT
static String
PROCEED_ZERO_NO_SUMMARY_OPT_DEFAULT
static String
THRESHOLD_OPT
This option should be a floating point number between 1 and 0.static String
THRESHOLD_OPT_DEFAULT
The default threshold.
-
Constructor Summary
Constructors Constructor Description TooManyDeletesSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(CompactionSelector.InitParameters iparams)
CompactionSelector.Selection
select(CompactionSelector.SelectionParameters sparams)
-
-
-
Field Detail
-
THRESHOLD_OPT
public static final String THRESHOLD_OPT
This option should be a floating point number between 1 and 0.- See Also:
- Constant Field Values
-
THRESHOLD_OPT_DEFAULT
public static final String THRESHOLD_OPT_DEFAULT
The default threshold.- See Also:
- Constant Field Values
-
PROCEED_ZERO_NO_SUMMARY_OPT
public static final String PROCEED_ZERO_NO_SUMMARY_OPT
- See Also:
- Constant Field Values
-
PROCEED_ZERO_NO_SUMMARY_OPT_DEFAULT
public static final String PROCEED_ZERO_NO_SUMMARY_OPT_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(CompactionSelector.InitParameters iparams)
- Specified by:
init
in interfaceCompactionSelector
-
select
public CompactionSelector.Selection select(CompactionSelector.SelectionParameters sparams)
- Specified by:
select
in interfaceCompactionSelector
-
-