Abortable (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs, interface: Abortable

Package org.apache.hadoop.fs

# Interface Abortable

All Known Implementing Classes:
  `CryptoFSDataOutputStream`, `FSDataOutputStream`

@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 Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `Abortable.AbortableResult`
  Interface for the result of aborts; allows subclasses to extend (IOStatistics etc) or for future enhancements if ever needed.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Abortable.AbortableResult`
  `abort()`
  Abort the active operation without the output becoming visible.

- ## Method Details

  - ### abort

    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.