Class S3AReadOpContext


public class S3AReadOpContext extends S3AOpContext
Read-specific operation context structure.
  • Constructor Details

    • S3AReadOpContext

      public S3AReadOpContext(org.apache.hadoop.fs.Path path, Invoker invoker, @Nullable org.apache.hadoop.fs.FileSystem.Statistics stats, S3AStatisticsContext instrumentation, org.apache.hadoop.fs.FileStatus dstFileStatus, VectoredIOContext vectoredIOContext, org.apache.hadoop.fs.statistics.IOStatisticsAggregator ioStatisticsAggregator, org.apache.hadoop.fs.impl.prefetch.ExecutorServiceFuturePool futurePool)
      Instantiate.
      Parameters:
      path - path of read
      invoker - invoker for normal retries.
      stats - Filesystem statistics (may be null)
      instrumentation - statistics context
      dstFileStatus - target file status
      vectoredIOContext - context for vectored read operation.
      ioStatisticsAggregator - IOStatistics aggregator for each thread.
      futurePool - Pool for any future IO
  • Method Details

    • build

      public S3AReadOpContext build()
      validate the context.
      Returns:
      a read operation context ready for use.
    • getReadInvoker

      public Invoker getReadInvoker()
      Get invoker to use for read operations.
      Returns:
      invoker to use for read codepaths
    • getPath

      public org.apache.hadoop.fs.Path getPath()
      Get the path of this read.
      Returns:
      path.
    • getInputPolicy

      public S3AInputPolicy getInputPolicy()
      Get the IO policy.
      Returns:
      the initial input policy.
    • getChangeDetectionPolicy

      public ChangeDetectionPolicy getChangeDetectionPolicy()
    • getReadahead

      public long getReadahead()
      Get the readahead for this operation.
      Returns:
      a value >= 0
    • getAuditSpan

      public org.apache.hadoop.fs.store.audit.AuditSpan getAuditSpan()
      Get the audit which was active when the file was opened.
      Returns:
      active span
    • withInputPolicy

      public S3AReadOpContext withInputPolicy(S3AInputPolicy value)
      Set builder value.
      Parameters:
      value - new value
      Returns:
      the builder
    • withChangeDetectionPolicy

      public S3AReadOpContext withChangeDetectionPolicy(ChangeDetectionPolicy value)
      Set builder value.
      Parameters:
      value - new value
      Returns:
      the builder
    • withReadahead

      public S3AReadOpContext withReadahead(long value)
      Set builder value.
      Parameters:
      value - new value
      Returns:
      the builder
    • withAuditSpan

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

      public S3AReadOpContext withAsyncDrainThreshold(long value)
      Set builder value.
      Parameters:
      value - new value
      Returns:
      the builder
    • getAsyncDrainThreshold

      public long getAsyncDrainThreshold()
    • getVectoredIOContext

      public VectoredIOContext getVectoredIOContext()
      Get Vectored IO context for this this read op.
      Returns:
      vectored IO context.
    • getIOStatisticsAggregator

      public org.apache.hadoop.fs.statistics.IOStatisticsAggregator getIOStatisticsAggregator()
      Return the IOStatistics aggregator.
      Returns:
      instance of IOStatisticsAggregator.
    • getFuturePool

      public org.apache.hadoop.fs.impl.prefetch.ExecutorServiceFuturePool getFuturePool()
      Gets the ExecutorServiceFuturePool used for asynchronous prefetches.
      Returns:
      the ExecutorServiceFuturePool used for asynchronous prefetches.
    • toString

      public String toString()
      Overrides:
      toString in class ActiveOperationContext