protected class CombiningUnilateralSortMerger.CombiningSpillingThread extends UnilateralSortMerger.SpillingThread
Thread.State, Thread.UncaughtExceptionHandler
comparator, ioManager, maxFanIn, memManager, mergeReadMemory, numWriteBuffersToCluster, serializer, writeMemory
queues
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
CombiningSpillingThread(ExceptionHandler<IOException> exceptionHandler,
UnilateralSortMerger.CircularQueues<E> queues,
AbstractInvokable parentTask,
MemoryManager memManager,
IOManager ioManager,
TypeSerializer<E> serializer,
TypeComparator<E> comparator,
List<MemorySegment> sortReadMemory,
List<MemorySegment> writeMemory,
int maxNumFileHandles,
boolean objectReuseEnabled) |
Modifier and Type | Method and Description |
---|---|
void |
go()
Entry point of the thread.
|
protected UnilateralSortMerger.ChannelWithBlockCount |
mergeChannels(List<UnilateralSortMerger.ChannelWithBlockCount> channelIDs,
List<List<MemorySegment>> readBuffers,
List<MemorySegment> writeBuffers)
Merges the sorted runs described by the given Channel IDs into a single sorted run.
|
disposeSortBuffers, getMergingIterator, getSegmentsForReaders, mergeChannelList, registerChannelToBeRemovedAtShudown, registerOpenChannelToBeRemovedAtShudown, takeNext, unregisterChannelToBeRemovedAtShudown, unregisterOpenChannelToBeRemovedAtShudown
internalHandleException, isRunning, run, shutdown, uncaughtException
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public CombiningSpillingThread(ExceptionHandler<IOException> exceptionHandler, UnilateralSortMerger.CircularQueues<E> queues, AbstractInvokable parentTask, MemoryManager memManager, IOManager ioManager, TypeSerializer<E> serializer, TypeComparator<E> comparator, List<MemorySegment> sortReadMemory, List<MemorySegment> writeMemory, int maxNumFileHandles, boolean objectReuseEnabled)
public void go() throws IOException
go
in class UnilateralSortMerger.SpillingThread
IOException
- Exceptions that prohibit correct completion of the work may be thrown by the thread.protected UnilateralSortMerger.ChannelWithBlockCount mergeChannels(List<UnilateralSortMerger.ChannelWithBlockCount> channelIDs, List<List<MemorySegment>> readBuffers, List<MemorySegment> writeBuffers) throws IOException
mergeChannels
in class UnilateralSortMerger.SpillingThread
channelIDs
- The IDs of the runs' channels.readBuffers
- The buffers for the readers that read the sorted runs.writeBuffers
- The buffers for the writer that writes the merged channel.IOException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.