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) |
Modifier and Type | Method and Description |
---|---|
void |
addNewFile(DataFileMeta file)
Add a new file.
|
List<DataFileMeta> |
allFiles() |
void |
close() |
Optional<CompactResult> |
getCompactionResult(boolean blocking)
Finish current task, and update result files to
Levels . |
Levels |
levels() |
boolean |
shouldWaitForLatestCompaction()
Should wait compaction finish.
|
boolean |
shouldWaitForPreparingCheckpoint() |
void |
triggerCompaction(boolean fullCompaction)
Trigger a new compaction task.
|
cancelCompaction, innerGetCompactionResult, isCompacting, obtainCompactResult
public 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)
public boolean shouldWaitForLatestCompaction()
CompactManager
public boolean shouldWaitForPreparingCheckpoint()
public void addNewFile(DataFileMeta file)
CompactManager
public List<DataFileMeta> allFiles()
public void triggerCompaction(boolean fullCompaction)
CompactManager
fullCompaction
- if caller needs a guaranteed full compaction@VisibleForTesting public Levels levels()
public Optional<CompactResult> getCompactionResult(boolean blocking) throws ExecutionException, InterruptedException
Levels
.public void close() throws IOException
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.