Class PrefetchingInputStreamFactory

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.fs.s3a.impl.streams.AbstractObjectInputStreamFactory
org.apache.hadoop.fs.s3a.prefetch.PrefetchingInputStreamFactory
All Implemented Interfaces:
Closeable, AutoCloseable, ObjectInputStreamFactory, org.apache.hadoop.fs.StreamCapabilities, org.apache.hadoop.service.Service

public class PrefetchingInputStreamFactory extends AbstractObjectInputStreamFactory
Factory for prefetching streams.

Reads and validates prefetch configuration options during service init.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.fs.s3a.impl.streams.ObjectInputStreamFactory

    ObjectInputStreamFactory.StreamFactoryCallbacks

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE

    Nested classes/interfaces inherited from interface org.apache.hadoop.fs.StreamCapabilities

    org.apache.hadoop.fs.StreamCapabilities.StreamCapability
  • Field Summary

    Fields inherited from interface org.apache.hadoop.fs.StreamCapabilities

    ABORTABLE_STREAM, DROPBEHIND, HFLUSH, HSYNC, IOSTATISTICS, IOSTATISTICS_CONTEXT, PREADBYTEBUFFER, READAHEAD, READBYTEBUFFER, UNBUFFER, VECTOREDIO, VECTOREDIO_BUFFERS_SLICED
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Calculate Return StreamFactoryRequirements.
    Create a new input stream.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    Get the input stream type.

    Methods inherited from class org.apache.hadoop.fs.s3a.impl.streams.AbstractObjectInputStreamFactory

    bind, callbacks, hasCapability

    Methods inherited from class org.apache.hadoop.service.AbstractService

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.service.Service

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
  • Constructor Details

    • PrefetchingInputStreamFactory

      public PrefetchingInputStreamFactory()
  • Method Details

    • streamType

      public InputStreamType streamType()
      Description copied from interface: ObjectInputStreamFactory
      Get the input stream type.
      Returns:
      the specific stream type this factory produces.
    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • readObject

      public ObjectInputStream readObject(ObjectReadParameters parameters) throws IOException
      Description copied from interface: ObjectInputStreamFactory
      Create a new input stream. There is no requirement to actually contact the store; this is generally done lazily.
      Parameters:
      parameters - parameters.
      Returns:
      the input stream
      Throws:
      IOException - problem creating the stream.
    • factoryRequirements

      public StreamFactoryRequirements factoryRequirements()
      Calculate Return StreamFactoryRequirements.
      Returns:
      thread count a vector minimum seek of 0.