public class BucketedAppendCompactManager extends CompactFutureManager
AppendOnlyFileStore
.Modifier and Type | Class and Description |
---|---|
static class |
BucketedAppendCompactManager.AutoCompactTask
A
CompactTask impl for append-only table auto-compaction. |
static interface |
BucketedAppendCompactManager.CompactRewriter
Compact rewriter for append-only table.
|
static class |
BucketedAppendCompactManager.FullCompactTask
A
CompactTask impl for full compaction of append-only table. |
taskFuture
Constructor and Description |
---|
BucketedAppendCompactManager(ExecutorService executor,
List<DataFileMeta> restored,
DeletionVectorsMaintainer dvMaintainer,
int minFileNum,
int maxFileNum,
long targetFileSize,
BucketedAppendCompactManager.CompactRewriter rewriter,
CompactionMetrics.Reporter metricsReporter) |
Modifier and Type | Method and Description |
---|---|
void |
addNewFile(DataFileMeta file)
Add a new file.
|
List<DataFileMeta> |
allFiles() |
void |
close() |
static Comparator<DataFileMeta> |
fileComparator(boolean ignoreOverlap)
New files may be created during the compaction process, then the results of the compaction
may be put after the new files, and this order will be disrupted.
|
Optional<CompactResult> |
getCompactionResult(boolean blocking)
Finish current task, and update result files to
toCompact . |
boolean |
shouldWaitForLatestCompaction()
Should wait compaction finish.
|
boolean |
shouldWaitForPreparingCheckpoint() |
void |
triggerCompaction(boolean fullCompaction)
Trigger a new compaction task.
|
cancelCompaction, innerGetCompactionResult, isCompacting, obtainCompactResult
public BucketedAppendCompactManager(ExecutorService executor, List<DataFileMeta> restored, @Nullable DeletionVectorsMaintainer dvMaintainer, int minFileNum, int maxFileNum, long targetFileSize, BucketedAppendCompactManager.CompactRewriter rewriter, @Nullable CompactionMetrics.Reporter metricsReporter)
public void triggerCompaction(boolean fullCompaction)
CompactManager
fullCompaction
- if caller needs a guaranteed full compactionpublic boolean shouldWaitForLatestCompaction()
CompactManager
public boolean shouldWaitForPreparingCheckpoint()
public void addNewFile(DataFileMeta file)
CompactManager
public List<DataFileMeta> allFiles()
public Optional<CompactResult> getCompactionResult(boolean blocking) throws ExecutionException, InterruptedException
toCompact
.public void close() throws IOException
IOException
public static Comparator<DataFileMeta> fileComparator(boolean ignoreOverlap)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.