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, syncwrite, write, writepublic abstract RecoverableWriter.ResumeRecoverable persist() throws IOException
FSDataOutputStream.sync()) and returns
a handle to recover the stream at the current position.IOExceptionpublic 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.IOExceptionpublic abstract void close()
throws IOException
This method should be understood as "close to dispose on failure".
close in interface Closeableclose in interface AutoCloseableclose in class FSDataOutputStreamIOException - Thrown, if an error occurred while closing the stream or guaranteeing
that the data is persistent.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.