public class MergeTreeCompactManager extends CompactFutureManager
KeyValueFileStore.taskFuture| Constructor and Description |
|---|
MergeTreeCompactManager(ExecutorService executor,
Levels levels,
CompactStrategy strategy,
Comparator<InternalRow> keyComparator,
long compactionFileSize,
int numSortedRunStopTrigger,
CompactRewriter rewriter,
CompactionMetrics.Reporter metricsReporter,
DeletionVectorsMaintainer dvMaintainer,
boolean lazyGenDeletionFile,
boolean needLookup,
RecordLevelExpire recordLevelExpire) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNewFile(DataFileMeta file)
Add a new file.
|
List<DataFileMeta> |
allFiles() |
void |
close() |
boolean |
compactNotCompleted()
Check if a compaction is in progress, or if a compaction result remains to be fetched, or if
a compaction should be triggered later.
|
Optional<CompactResult> |
getCompactionResult(boolean blocking)
Finish current task, and update result files to
Levels. |
CompactStrategy |
getStrategy() |
Levels |
levels() |
boolean |
shouldWaitForLatestCompaction()
Should wait compaction finish.
|
boolean |
shouldWaitForPreparingCheckpoint() |
void |
triggerCompaction(boolean fullCompaction)
Trigger a new compaction task.
|
cancelCompaction, innerGetCompactionResult, obtainCompactResultpublic MergeTreeCompactManager(ExecutorService executor, Levels levels, CompactStrategy strategy, Comparator<InternalRow> keyComparator, long compactionFileSize, int numSortedRunStopTrigger, CompactRewriter rewriter, @Nullable CompactionMetrics.Reporter metricsReporter, @Nullable DeletionVectorsMaintainer dvMaintainer, boolean lazyGenDeletionFile, boolean needLookup, @Nullable RecordLevelExpire recordLevelExpire)
public boolean shouldWaitForLatestCompaction()
CompactManagerpublic boolean shouldWaitForPreparingCheckpoint()
public void addNewFile(DataFileMeta file)
CompactManagerpublic List<DataFileMeta> allFiles()
public void triggerCompaction(boolean fullCompaction)
CompactManagerfullCompaction - if caller needs a guaranteed full compaction@VisibleForTesting public Levels levels()
public Optional<CompactResult> getCompactionResult(boolean blocking) throws ExecutionException, InterruptedException
Levels.public boolean compactNotCompleted()
CompactManagercompactNotCompleted in interface CompactManagercompactNotCompleted in class CompactFutureManagerpublic void close()
throws IOException
IOException@VisibleForTesting public CompactStrategy getStrategy()
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.