public class LookupMergeTreeCompactRewriter<T> extends ChangelogMergeTreeRewriter
MergeTreeCompactRewriter
which produces changelog files by lookup for the compaction
involving level 0 files.Modifier and Type | Class and Description |
---|---|
static class |
LookupMergeTreeCompactRewriter.FirstRowMergeFunctionWrapperFactory
A
LookupMergeTreeCompactRewriter.MergeFunctionWrapperFactory for first row. |
static class |
LookupMergeTreeCompactRewriter.LookupMergeFunctionWrapperFactory<T>
A normal
LookupMergeTreeCompactRewriter.MergeFunctionWrapperFactory to create lookup wrapper. |
static interface |
LookupMergeTreeCompactRewriter.MergeFunctionWrapperFactory<T>
Factory to create
MergeFunctionWrapper . |
ChangelogMergeTreeRewriter.UpgradeStrategy
maxLevel, mergeEngine
keyComparator, mergeSorter, mfFactory, readerFactory, userDefinedSeqComparator, writerFactory
Constructor and Description |
---|
LookupMergeTreeCompactRewriter(int maxLevel,
CoreOptions.MergeEngine mergeEngine,
LookupLevels<T> lookupLevels,
FileReaderFactory<KeyValue> readerFactory,
KeyValueFileWriterFactory writerFactory,
Comparator<InternalRow> keyComparator,
FieldsComparator userDefinedSeqComparator,
MergeFunctionFactory<KeyValue> mfFactory,
MergeSorter mergeSorter,
LookupMergeTreeCompactRewriter.MergeFunctionWrapperFactory<T> wrapperFactory,
boolean produceChangelog,
DeletionVectorsMaintainer dvMaintainer,
CoreOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected MergeFunctionWrapper<ChangelogResult> |
createMergeWrapper(int outputLevel) |
protected void |
notifyRewriteCompactBefore(List<DataFileMeta> files) |
protected boolean |
rewriteChangelog(int outputLevel,
boolean dropDelete,
List<List<SortedRun>> sections) |
protected ChangelogMergeTreeRewriter.UpgradeStrategy |
upgradeStrategy(int outputLevel,
DataFileMeta file) |
rewrite, rewriteLookupChangelog, upgrade
readerForMergeTree, rewriteCompaction
extractFilesFromSections
public LookupMergeTreeCompactRewriter(int maxLevel, CoreOptions.MergeEngine mergeEngine, LookupLevels<T> lookupLevels, FileReaderFactory<KeyValue> readerFactory, KeyValueFileWriterFactory writerFactory, Comparator<InternalRow> keyComparator, @Nullable FieldsComparator userDefinedSeqComparator, MergeFunctionFactory<KeyValue> mfFactory, MergeSorter mergeSorter, LookupMergeTreeCompactRewriter.MergeFunctionWrapperFactory<T> wrapperFactory, boolean produceChangelog, @Nullable DeletionVectorsMaintainer dvMaintainer, CoreOptions options)
protected void notifyRewriteCompactBefore(List<DataFileMeta> files)
notifyRewriteCompactBefore
in class MergeTreeCompactRewriter
protected boolean rewriteChangelog(int outputLevel, boolean dropDelete, List<List<SortedRun>> sections)
rewriteChangelog
in class ChangelogMergeTreeRewriter
protected ChangelogMergeTreeRewriter.UpgradeStrategy upgradeStrategy(int outputLevel, DataFileMeta file)
upgradeStrategy
in class ChangelogMergeTreeRewriter
protected MergeFunctionWrapper<ChangelogResult> createMergeWrapper(int outputLevel)
createMergeWrapper
in class ChangelogMergeTreeRewriter
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractCompactRewriter
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.