public abstract class CheckpointMetadataOutputStream extends FSDataOutputStream
This stream is similar to the CheckpointStateOutputStream
, but for metadata files
rather thancdata files.
This stream always creates a file, regardless of the amount of data written.
Constructor and Description |
---|
CheckpointMetadataOutputStream() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
This method should close the stream, if has not been closed before.
|
abstract CompletedCheckpointStorageLocation |
closeAndFinalizeCheckpoint()
Closes the stream after all metadata was written and finalizes the checkpoint location.
|
flush, getPos, sync
write, write, write
public abstract CompletedCheckpointStorageLocation closeAndFinalizeCheckpoint() throws IOException
IOException
- Thrown, if the stream cannot be closed or the finalization fails.public abstract void close() throws IOException
The above implies that this method is intended to be the "unsuccessful close", such as
when cancelling the stream writing, or when an exception occurs. Closing the stream for the
successful case must go through closeAndFinalizeCheckpoint()
.
close
in interface Closeable
close
in interface AutoCloseable
close
in class FSDataOutputStream
IOException
- Thrown, if the stream cannot be closed.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.