public class IOManagerAsync extends IOManager implements Thread.UncaughtExceptionHandler
IOManager that uses asynchronous I/O.| Constructor and Description |
|---|
IOManagerAsync()
Constructs a new asynchronous I/O manager, writing files to the system 's temp directory.
|
IOManagerAsync(String tempDir)
Constructs a new asynchronous I/O manager, writing file to the given directory.
|
IOManagerAsync(String[] tempDirs)
Constructs a new asynchronous I/O manager, writing file round robin across the given
directories.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close method.
|
BlockChannelReader<org.apache.flink.core.memory.MemorySegment> |
createBlockChannelReader(FileIOChannel.ID channelID,
LinkedBlockingQueue<org.apache.flink.core.memory.MemorySegment> returnQueue)
Creates a block channel reader that reads blocks from the given channel.
|
BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> |
createBlockChannelWriter(FileIOChannel.ID channelID,
LinkedBlockingQueue<org.apache.flink.core.memory.MemorySegment> returnQueue)
Creates a block channel writer that writes to the given channel.
|
BlockChannelWriterWithCallback<org.apache.flink.core.memory.MemorySegment> |
createBlockChannelWriter(FileIOChannel.ID channelID,
RequestDoneCallback<org.apache.flink.core.memory.MemorySegment> callback)
Creates a block channel writer that writes to the given channel.
|
BufferFileReader |
createBufferFileReader(FileIOChannel.ID channelID,
RequestDoneCallback<Buffer> callback) |
BufferFileSegmentReader |
createBufferFileSegmentReader(FileIOChannel.ID channelID,
RequestDoneCallback<FileSegment> callback) |
BufferFileWriter |
createBufferFileWriter(FileIOChannel.ID channelID) |
BulkBlockChannelReader |
createBulkBlockChannelReader(FileIOChannel.ID channelID,
List<org.apache.flink.core.memory.MemorySegment> targetSegments,
int numBlocks)
Creates a block channel reader that reads all blocks from the given channel directly in one
bulk.
|
void |
uncaughtException(Thread t,
Throwable e) |
createBlockChannelReader, createBlockChannelWriter, createChannel, createChannelEnumerator, deleteChannel, getSpillingDirectories, getSpillingDirectoriesPathspublic IOManagerAsync()
public IOManagerAsync(String tempDir)
tempDir - The directory to write temporary files to.public IOManagerAsync(String[] tempDirs)
tempDirs - The directories to write temporary files to.public void close()
throws Exception
close in interface AutoCloseableclose in class IOManagerExceptionpublic void uncaughtException(Thread t, Throwable e)
uncaughtException in interface Thread.UncaughtExceptionHandlerpublic BlockChannelWriter<org.apache.flink.core.memory.MemorySegment> createBlockChannelWriter(FileIOChannel.ID channelID, LinkedBlockingQueue<org.apache.flink.core.memory.MemorySegment> returnQueue) throws IOException
IOManagercreateBlockChannelWriter in class IOManagerchannelID - The descriptor for the channel to write to.returnQueue - The queue to put the written buffers into.IOException - Thrown, if the channel for the writer could not be opened.public BlockChannelWriterWithCallback<org.apache.flink.core.memory.MemorySegment> createBlockChannelWriter(FileIOChannel.ID channelID, RequestDoneCallback<org.apache.flink.core.memory.MemorySegment> callback) throws IOException
IOManagercreateBlockChannelWriter in class IOManagerchannelID - The descriptor for the channel to write to.callback - The callback to be called forIOException - Thrown, if the channel for the writer could not be opened.public BlockChannelReader<org.apache.flink.core.memory.MemorySegment> createBlockChannelReader(FileIOChannel.ID channelID, LinkedBlockingQueue<org.apache.flink.core.memory.MemorySegment> returnQueue) throws IOException
createBlockChannelReader in class IOManagerchannelID - The descriptor for the channel to write to.returnQueue - The queue to put the full buffers into.IOException - Thrown, if the channel for the reader could not be opened.public BufferFileWriter createBufferFileWriter(FileIOChannel.ID channelID) throws IOException
createBufferFileWriter in class IOManagerIOExceptionpublic BufferFileReader createBufferFileReader(FileIOChannel.ID channelID, RequestDoneCallback<Buffer> callback) throws IOException
createBufferFileReader in class IOManagerIOExceptionpublic BufferFileSegmentReader createBufferFileSegmentReader(FileIOChannel.ID channelID, RequestDoneCallback<FileSegment> callback) throws IOException
createBufferFileSegmentReader in class IOManagerIOExceptionpublic BulkBlockChannelReader createBulkBlockChannelReader(FileIOChannel.ID channelID, List<org.apache.flink.core.memory.MemorySegment> targetSegments, int numBlocks) throws IOException
If a channel is not to be read in one bulk, but in multiple smaller batches, a BlockChannelReader should be used.
createBulkBlockChannelReader in class IOManagerchannelID - The descriptor for the channel to write to.targetSegments - The list to take the segments from into which to read the data.numBlocks - The number of blocks in the channel to read.IOException - Thrown, if the channel for the reader could not be opened.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.