Class RetryingInputEntity

java.lang.Object
org.apache.druid.data.input.RetryingInputEntity
All Implemented Interfaces:
InputEntity
Direct Known Subclasses:
HttpEntity

public abstract class RetryingInputEntity extends Object implements InputEntity
  • Constructor Details

    • RetryingInputEntity

      public RetryingInputEntity()
  • Method Details

    • open

      public InputStream open() throws IOException
      Open a RetryingInputStream wrapper for an underlying input stream, optionally decompressing the retrying stream if the file extension matches a known compression, otherwise passing through the retrying stream directly.
      Specified by:
      open in interface InputEntity
      Throws:
      IOException
      See Also:
    • getMaxRetries

      protected int getMaxRetries()
    • readFromStart

      protected InputStream readFromStart() throws IOException
      Directly opens an InputStream on the input entity. Decompression should be handled externally, and is handled by the default implementation of open(), so this should return the raw stream for the object.
      Throws:
      IOException
    • readFrom

      protected abstract InputStream readFrom(long offset) throws IOException
      Directly opens an InputStream starting at the given offset on the input entity. Decompression should be handled externally, and is handled by the default implementation of open(),this should return the raw stream for the object.
      Parameters:
      offset - an offset to start reading from. A non-negative integer counting the number of bytes from the beginning of the entity
      Throws:
      IOException
    • getPath

      protected abstract String getPath()
      Get path name for this entity, used by the default implementation of open() to determine if the underlying stream needs decompressed, based on file extension of the path