public final class ExternalSorterBuilder<T> extends Object
ExternalSorter. It can construct either a pull-based sorter if provided
with an input iterator via build(MutableObjectIterator) or a push-based one via build().| 限定符和类型 | 方法和说明 |
|---|---|
PushSorter<T> |
build()
Creates a push-based
PushSorter. |
ExternalSorter<T> |
build(org.apache.flink.util.MutableObjectIterator<T> input)
Creates a pull-based
Sorter. |
ExternalSorterBuilder<T> |
enableSpilling(IOManager ioManager) |
ExternalSorterBuilder<T> |
enableSpilling(IOManager ioManager,
double startSpillingFraction) |
ExternalSorterBuilder<T> |
largeRecords(boolean enabled) |
ExternalSorterBuilder<T> |
maxNumFileHandles(int maxNumFileHandles) |
ExternalSorterBuilder<T> |
memory(List<org.apache.flink.core.memory.MemorySegment> memorySegments) |
ExternalSorterBuilder<T> |
memoryFraction(double fraction) |
ExternalSorterBuilder<T> |
objectReuse(boolean enabled) |
ExternalSorterBuilder<T> |
sortBuffers(int numSortBuffers) |
ExternalSorterBuilder<T> |
sorterFactory(InMemorySorterFactory<T> sorterFactory) |
ExternalSorterBuilder<T> |
withCombiner(org.apache.flink.api.common.functions.GroupCombineFunction<T,T> combineFunction) |
ExternalSorterBuilder<T> |
withCombiner(org.apache.flink.api.common.functions.GroupCombineFunction<T,T> combineFunction,
org.apache.flink.configuration.Configuration udfConfig) |
public ExternalSorterBuilder<T> maxNumFileHandles(int maxNumFileHandles)
public ExternalSorterBuilder<T> objectReuse(boolean enabled)
public ExternalSorterBuilder<T> largeRecords(boolean enabled)
public ExternalSorterBuilder<T> enableSpilling(IOManager ioManager)
public ExternalSorterBuilder<T> enableSpilling(IOManager ioManager, double startSpillingFraction)
public ExternalSorterBuilder<T> memoryFraction(double fraction)
public ExternalSorterBuilder<T> memory(List<org.apache.flink.core.memory.MemorySegment> memorySegments)
public ExternalSorterBuilder<T> sortBuffers(int numSortBuffers)
public ExternalSorterBuilder<T> withCombiner(org.apache.flink.api.common.functions.GroupCombineFunction<T,T> combineFunction, org.apache.flink.configuration.Configuration udfConfig)
public ExternalSorterBuilder<T> withCombiner(org.apache.flink.api.common.functions.GroupCombineFunction<T,T> combineFunction)
public ExternalSorterBuilder<T> sorterFactory(InMemorySorterFactory<T> sorterFactory)
public ExternalSorter<T> build(org.apache.flink.util.MutableObjectIterator<T> input) throws MemoryAllocationException
Sorter. The CloseableInputProvider.getIterator() will return when all
the records from the given input are consumed. Will spawn three threads: read, sort, spill.public PushSorter<T> build() throws MemoryAllocationException
PushSorter. The CloseableInputProvider.getIterator() will return
when the PushSorter.finishReading() is called. Will spawn two threads: sort, spill.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.