Class BinaryKVExternalMerger
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sort.AbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
-
- org.apache.flink.table.runtime.operators.sort.BinaryKVExternalMerger
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class BinaryKVExternalMerger extends AbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
Key-Value style record merger for sort.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.sort.AbstractBinaryExternalMerger
ioManager, pageSize
-
-
Constructor Summary
Constructors Constructor Description BinaryKVExternalMerger(IOManager ioManager, int pageSize, int maxFanIn, SpillChannelManager channelManager, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, boolean compressionEnabled, BlockCompressionFactory compressionCodecFactory, int compressionBlockSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>>
channelReaderInputViewIterator(AbstractChannelReaderInputView inView)
protected Comparator<Tuple2<BinaryRowData,BinaryRowData>>
mergeComparator()
protected List<Tuple2<BinaryRowData,BinaryRowData>>
mergeReusedEntries(int size)
protected void
writeMergingOutput(MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>> mergeIterator, AbstractPagedOutputView output)
read the merged stream and write the data back.-
Methods inherited from class org.apache.flink.table.runtime.operators.sort.AbstractBinaryExternalMerger
close, getMergingIterator, mergeChannelList
-
-
-
-
Constructor Detail
-
BinaryKVExternalMerger
public BinaryKVExternalMerger(IOManager ioManager, int pageSize, int maxFanIn, SpillChannelManager channelManager, BinaryRowDataSerializer keySerializer, BinaryRowDataSerializer valueSerializer, RecordComparator comparator, boolean compressionEnabled, BlockCompressionFactory compressionCodecFactory, int compressionBlockSize)
-
-
Method Detail
-
mergeReusedEntries
protected List<Tuple2<BinaryRowData,BinaryRowData>> mergeReusedEntries(int size)
- Specified by:
mergeReusedEntries
in classAbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
- Returns:
- reused entry object used in merging.
-
channelReaderInputViewIterator
protected MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>> channelReaderInputViewIterator(AbstractChannelReaderInputView inView)
- Specified by:
channelReaderInputViewIterator
in classAbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
- Returns:
- entry iterator reading from inView.
-
mergeComparator
protected Comparator<Tuple2<BinaryRowData,BinaryRowData>> mergeComparator()
- Specified by:
mergeComparator
in classAbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
- Returns:
- merging comparator used in merging.
-
writeMergingOutput
protected void writeMergingOutput(MutableObjectIterator<Tuple2<BinaryRowData,BinaryRowData>> mergeIterator, AbstractPagedOutputView output) throws IOException
Description copied from class:AbstractBinaryExternalMerger
read the merged stream and write the data back.- Specified by:
writeMergingOutput
in classAbstractBinaryExternalMerger<Tuple2<BinaryRowData,BinaryRowData>>
- Throws:
IOException
-
-