@NotThreadSafe public final class LocalFileDataWriter extends Object implements DataWriter
DataWriter.Factory| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels an operation.
|
int |
chunkSize() |
void |
close() |
static LocalFileDataWriter |
create(FileSystemContext context,
alluxio.wire.WorkerNetAddress address,
long blockId,
OutStreamOptions options)
Creates an instance of
LocalFileDataWriter. |
void |
flush()
Flushes all the pending chunks.
|
long |
pos() |
void |
writeChunk(io.netty.buffer.ByteBuf buf)
Writes a chunk.
|
public static LocalFileDataWriter create(FileSystemContext context, alluxio.wire.WorkerNetAddress address, long blockId, OutStreamOptions options) throws IOException
LocalFileDataWriter. This requires the block to be locked
beforehand.context - the file system contextaddress - the worker network addressblockId - the block IDoptions - the output stream optionsLocalFileDataWriter createdIOExceptionpublic long pos()
pos in interface DataWriterpublic int chunkSize()
chunkSize in interface DataWriterpublic void writeChunk(io.netty.buffer.ByteBuf buf)
throws IOException
DataWriterwriteChunk in interface DataWriterbuf - the chunkIOExceptionpublic void cancel()
throws IOException
Cancelablecancel in interface CancelableIOExceptionpublic void flush()
DataWriterflush in interface DataWriterpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2024. All Rights Reserved.