public abstract class RecoverableFsDataOutputStream extends FSDataOutputStream
Modifier and Type | Class and Description |
---|---|
static interface |
RecoverableFsDataOutputStream.Committer
A committer can publish the file of a stream that was closed.
|
Constructor and Description |
---|
RecoverableFsDataOutputStream() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes the stream releasing all local resources, but not finalizing the
file that the stream writes to.
|
abstract RecoverableFsDataOutputStream.Committer |
closeForCommit()
Closes the stream, ensuring persistence of all data (similar to
FSDataOutputStream.sync() ). |
abstract RecoverableWriter.ResumeRecoverable |
persist()
Ensures all data so far is persistent (similar to
FSDataOutputStream.sync() ) and returns
a handle to recover the stream at the current position. |
flush, getPos, sync
write, write, write
public abstract RecoverableWriter.ResumeRecoverable persist() throws IOException
FSDataOutputStream.sync()
) and returns
a handle to recover the stream at the current position.IOException
public abstract RecoverableFsDataOutputStream.Committer closeForCommit() throws IOException
FSDataOutputStream.sync()
).
This returns a Committer that can be used to publish (make visible) the file
that the stream was writing to.IOException
public abstract void close() throws IOException
This method should be understood as "close to dispose on failure".
close
in interface Closeable
close
in interface AutoCloseable
close
in class FSDataOutputStream
IOException
- Thrown, if an error occurred while closing the stream or guaranteeing
that the data is persistent.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.