public class FullChangelogMergeFunctionWrapper extends Object implements MergeFunctionWrapper<ChangelogResult>
MergeFunction
s to produce changelog during a full compaction.
This wrapper can only be used in SortMergeReader
because
KeyValue
s. As KeyValue
s are reused by readers
this may cause issues in other readers.
KeyValue
s with the same key come from different inner readers in SortMergeReader
, so there is no issue related to object reuse.
Constructor and Description |
---|
FullChangelogMergeFunctionWrapper(MergeFunction<KeyValue> mergeFunction,
int maxLevel,
RecordEqualiser valueEqualiser) |
Modifier and Type | Method and Description |
---|---|
void |
add(KeyValue kv) |
ChangelogResult |
getResult() |
void |
reset() |
public FullChangelogMergeFunctionWrapper(MergeFunction<KeyValue> mergeFunction, int maxLevel, @Nullable RecordEqualiser valueEqualiser)
public void reset()
reset
in interface MergeFunctionWrapper<ChangelogResult>
public void add(KeyValue kv)
add
in interface MergeFunctionWrapper<ChangelogResult>
public ChangelogResult getResult()
getResult
in interface MergeFunctionWrapper<ChangelogResult>
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.