@NotThreadSafe public class DoraFileOutStream extends FileOutStream
UnderStorageType
is
UnderStorageType.SYNC_PERSIST
, another stream will write the data to the under storage
system.Modifier and Type | Field and Description |
---|---|
protected AlluxioURI |
mUri |
mBytesWritten
Constructor and Description |
---|
DoraFileOutStream(DoraCacheClient doraClient,
NettyDataWriter dataWriter,
AlluxioURI path,
OutStreamOptions options,
FileSystemContext context,
FileOutStream ufsOutStream,
String uuid)
Creates a new file output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Aborts the output stream.
|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
getBytesWritten
protected final AlluxioURI mUri
public DoraFileOutStream(DoraCacheClient doraClient, NettyDataWriter dataWriter, AlluxioURI path, OutStreamOptions options, FileSystemContext context, @Nullable FileOutStream ufsOutStream, String uuid) throws IOException
doraClient
- the dora client for requesting dora workerdataWriter
- the netty data writer which is used for transferring data with nettypath
- the file pathoptions
- the client optionscontext
- the file system contextufsOutStream
- the UfsOutStream for writing data to UFSuuid
- the UUID of a certain OutStreamIOException
public void cancel() throws IOException
FileOutStream
cancel
in interface Cancelable
cancel
in class FileOutStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
Copyright © 2023. All Rights Reserved.