Class EagerInputFile

java.lang.Object
org.apache.iceberg.io.EagerInputFile
All Implemented Interfaces:
InputFile

public class EagerInputFile extends Object implements InputFile
A decorator that collapses multiple object-store requests into one by fetching the entire file eagerly on the first call.
  • Method Details

    • of

      public static InputFile of(InputFile delegate, long length)
      Returns an InputFile that reads the entire file in a single request.
    • getLength

      public long getLength()
      Description copied from interface: InputFile
      Returns the total length of the file, in bytes
      Specified by:
      getLength in interface InputFile
      Returns:
      the total length of the file, in bytes
    • location

      public String location()
      Description copied from interface: InputFile
      The fully-qualified location of the input file as a String.
      Specified by:
      location in interface InputFile
      Returns:
      the input file location
    • exists

      public boolean exists()
      Description copied from interface: InputFile
      Checks whether the file exists.
      Specified by:
      exists in interface InputFile
      Returns:
      true if the file exists, false otherwise
    • newStream

      public SeekableInputStream newStream()
      Description copied from interface: InputFile
      Opens a new SeekableInputStream for the underlying data file
      Specified by:
      newStream in interface InputFile
      Returns:
      a seekable stream for reading the file