Package org.apache.hadoop.fs
Interface Abortable
- All Known Implementing Classes:
FSDataOutputStream,HdfsDataOutputStream
@Public
@Unstable
public interface Abortable
Abort data being written to a stream, so that close() does
not write the data. It is implemented by output streams in
some object stores, and passed through
FSDataOutputStream.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceorg.apache.hadoop.fs.Abortable.AbortableResultInterface for the result of aborts; allows subclasses to extend (IOStatistics etc) or for future enhancements if ever needed. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.Abortable.AbortableResultabort()Abort the active operation without the output becoming visible.
-
Method Details
-
abort
org.apache.hadoop.fs.Abortable.AbortableResult abort()Abort the active operation without the output becoming visible. This is to provide ability to cancel the write on stream; once a stream is aborted, the write MUST NOT become visible.- Returns:
- the result.
- Throws:
UnsupportedOperationException- if the operation is not supported.
-