Class BinaryExternalMerger
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sort.AbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>
-
- org.apache.flink.table.runtime.operators.sort.BinaryExternalMerger
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class BinaryExternalMerger extends AbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>
Record merger for sort of BinaryRowData.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.sort.AbstractBinaryExternalMerger
ioManager, pageSize
-
-
Constructor Summary
Constructors Constructor Description BinaryExternalMerger(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, int pageSize, int maxFanIn, SpillChannelManager channelManager, BinaryRowDataSerializer serializer, RecordComparator comparator, boolean compressionEnabled, org.apache.flink.runtime.io.compression.BlockCompressionFactory compressionCodecFactory, int compressionBlockSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData>channelReaderInputViewIterator(org.apache.flink.runtime.io.disk.iomanager.AbstractChannelReaderInputView inView)protected Comparator<org.apache.flink.table.data.binary.BinaryRowData>mergeComparator()protected List<org.apache.flink.table.data.binary.BinaryRowData>mergeReusedEntries(int size)protected voidwriteMergingOutput(org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> mergeIterator, org.apache.flink.runtime.memory.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
-
BinaryExternalMerger
public BinaryExternalMerger(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, int pageSize, int maxFanIn, SpillChannelManager channelManager, BinaryRowDataSerializer serializer, RecordComparator comparator, boolean compressionEnabled, org.apache.flink.runtime.io.compression.BlockCompressionFactory compressionCodecFactory, int compressionBlockSize)
-
-
Method Detail
-
channelReaderInputViewIterator
protected org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> channelReaderInputViewIterator(org.apache.flink.runtime.io.disk.iomanager.AbstractChannelReaderInputView inView)
- Specified by:
channelReaderInputViewIteratorin classAbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>- Returns:
- entry iterator reading from inView.
-
mergeComparator
protected Comparator<org.apache.flink.table.data.binary.BinaryRowData> mergeComparator()
- Specified by:
mergeComparatorin classAbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>- Returns:
- merging comparator used in merging.
-
mergeReusedEntries
protected List<org.apache.flink.table.data.binary.BinaryRowData> mergeReusedEntries(int size)
- Specified by:
mergeReusedEntriesin classAbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>- Returns:
- reused entry object used in merging.
-
writeMergingOutput
protected void writeMergingOutput(org.apache.flink.util.MutableObjectIterator<org.apache.flink.table.data.binary.BinaryRowData> mergeIterator, org.apache.flink.runtime.memory.AbstractPagedOutputView output) throws IOExceptionDescription copied from class:AbstractBinaryExternalMergerread the merged stream and write the data back.- Specified by:
writeMergingOutputin classAbstractBinaryExternalMerger<org.apache.flink.table.data.binary.BinaryRowData>- Throws:
IOException
-
-