Class S3ADataBlocks.BlockUploadData

java.lang.Object
org.apache.hadoop.fs.s3a.S3ADataBlocks.BlockUploadData
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
S3ADataBlocks

public static final class S3ADataBlocks.BlockUploadData extends Object implements Closeable
The output information for an upload.

The data is accessed via the content provider; other constructors create the appropriate content provider for the data.

When close() is called, the content provider is itself closed.

  • Constructor Details

    • BlockUploadData

      public BlockUploadData(UploadContentProviders.BaseContentProvider<?> contentProvider)
    • BlockUploadData

      public BlockUploadData(File file, Supplier<Boolean> isOpen)
      File constructor; input stream will be null.
      Parameters:
      file - file to upload
      isOpen - optional predicate to check if the stream is open.
    • BlockUploadData

      public BlockUploadData(byte[] bytes, int offset, int size, Supplier<Boolean> isOpen)
      Byte array constructor, with support for uploading just a slice of the array.
      Parameters:
      bytes - buffer to read.
      offset - offset in buffer.
      size - size of the data.
      isOpen - optional predicate to check if the stream is open.
      Throws:
      IllegalArgumentException - if the arguments are invalid.
      NullPointerException - if the buffer is null.
    • BlockUploadData

      public BlockUploadData(byte[] bytes, Supplier<Boolean> isOpen)
      Byte array constructor to upload all of the array.
      Parameters:
      bytes - buffer to read.
      isOpen - optional predicate to check if the stream is open.
      Throws:
      IllegalArgumentException - if the arguments are invalid.
      NullPointerException - if the buffer is null.
  • Method Details