Class ObjectReadParameters

java.lang.Object
org.apache.hadoop.fs.s3a.impl.streams.ObjectReadParameters

public final class ObjectReadParameters extends Object
Parameters for object input streams created through ObjectInputStreamFactory. It is designed to support extra parameters added in future.

Note that the validate() operation does not freeze the parameters -instead it simply verifies that all required values are set.

  • Constructor Details

    • ObjectReadParameters

      public ObjectReadParameters()
  • Method Details

    • getEncryptionSecrets

      public EncryptionSecrets getEncryptionSecrets()
      Getter.
      Returns:
      Encryption secrets.
    • withEncryptionSecrets

      public ObjectReadParameters withEncryptionSecrets(EncryptionSecrets value)
      Set encryption secrets.
      Parameters:
      value - new value
      Returns:
      the builder
    • getContext

      public S3AReadOpContext getContext()
      Returns:
      Read operation context.
    • withContext

      public ObjectReadParameters withContext(S3AReadOpContext value)
      Set read operation context.
      Parameters:
      value - new value
      Returns:
      the builder
    • getObjectAttributes

      public S3ObjectAttributes getObjectAttributes()
      Returns:
      Attributes of the object.
    • withObjectAttributes

      public ObjectReadParameters withObjectAttributes(S3ObjectAttributes value)
      Set object attributes.
      Parameters:
      value - new value
      Returns:
      the builder
    • getCallbacks

      public ObjectInputStreamCallbacks getCallbacks()
      Returns:
      callbacks to store read operations.
    • withCallbacks

      public ObjectReadParameters withCallbacks(ObjectInputStreamCallbacks value)
      Set callbacks to store read operation.
      Parameters:
      value - new value
      Returns:
      the builder
    • getStreamStatistics

      public S3AInputStreamStatistics getStreamStatistics()
      Returns:
      Stream statistics.
    • withStreamStatistics

      public ObjectReadParameters withStreamStatistics(S3AInputStreamStatistics value)
      Set SetStream statistics callback.
      Parameters:
      value - new value
      Returns:
      the builder
    • getBoundedThreadPool

      public ExecutorService getBoundedThreadPool()
      Returns:
      Bounded thread pool for submitting asynchronous work.
    • withBoundedThreadPool

      public ObjectReadParameters withBoundedThreadPool(ExecutorService value)
      Set bounded thread pool.
      Parameters:
      value - new value
      Returns:
      the builder
    • getDirectoryAllocator

      public org.apache.hadoop.fs.LocalDirAllocator getDirectoryAllocator()
      Getter.
      Returns:
      Allocator of local FS storage.
    • withDirectoryAllocator

      public ObjectReadParameters withDirectoryAllocator(org.apache.hadoop.fs.LocalDirAllocator value)
      Set allocator of local FS storage.
      Parameters:
      value - new value
      Returns:
      the builder
    • getAuditSpan

      public org.apache.hadoop.fs.store.audit.AuditSpan getAuditSpan()
      Getter.
      Returns:
      Audit span.
    • withAuditSpan

      public ObjectReadParameters withAuditSpan(org.apache.hadoop.fs.store.audit.AuditSpan value)
      Set audit span.
      Parameters:
      value - new value
      Returns:
      the builder
    • validate

      public ObjectReadParameters validate()
      Validate that all attributes are as expected. Mock tests can skip this if required.
      Returns:
      the object.