@NotThreadSafe public final class UfsFallbackLocalFileDataWriter extends Object implements DataWriter
DataWriter.Factory
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels an operation.
|
int |
chunkSize() |
void |
close() |
static UfsFallbackLocalFileDataWriter |
create(FileSystemContext context,
WorkerNetAddress address,
long blockId,
long blockSize,
OutStreamOptions options) |
void |
flush()
Flushes all the pending chunks.
|
long |
pos() |
void |
writeChunk(io.netty.buffer.ByteBuf chunk)
Writes a chunk.
|
public static UfsFallbackLocalFileDataWriter create(FileSystemContext context, WorkerNetAddress address, long blockId, long blockSize, OutStreamOptions options) throws IOException
context
- the file system contextaddress
- the worker network addressblockId
- the block IDblockSize
- the block sizeoptions
- the output stream optionsUfsFallbackLocalFileDataWriter
instance createdIOException
public void writeChunk(io.netty.buffer.ByteBuf chunk) throws IOException
DataWriter
writeChunk
in interface DataWriter
chunk
- the chunkIOException
public void flush() throws IOException
DataWriter
flush
in interface DataWriter
IOException
public int chunkSize()
chunkSize
in interface DataWriter
public long pos()
pos
in interface DataWriter
public void cancel() throws IOException
Cancelable
cancel
in interface Cancelable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.