Class HadoopInputFile

java.lang.Object
org.apache.parquet.hadoop.util.HadoopInputFile
All Implemented Interfaces:
org.apache.parquet.io.InputFile

public class HadoopInputFile extends Object implements org.apache.parquet.io.InputFile
  • Method Details

    • fromPath

      public static HadoopInputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException
      Throws:
      IOException
    • fromPathUnchecked

      public static HadoopInputFile fromPathUnchecked(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
    • fromStatus

      public static HadoopInputFile fromStatus(org.apache.hadoop.fs.FileStatus stat, org.apache.hadoop.conf.Configuration conf) throws IOException
      Throws:
      IOException
    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
    • getPath

      public org.apache.hadoop.fs.Path getPath()
    • getLength

      public long getLength()
      Specified by:
      getLength in interface org.apache.parquet.io.InputFile
    • newStream

      public org.apache.parquet.io.SeekableInputStream newStream() throws IOException
      Open the file.

      Uses FileSystem.openFile() so that the existing FileStatus can be passed down: saves a HEAD request on cloud storage. and ignored everywhere else.

      Specified by:
      newStream in interface org.apache.parquet.io.InputFile
      Returns:
      the input stream.
      Throws:
      InterruptedIOException - future was interrupted
      IOException - if something went wrong
      RuntimeException - any nested RTE thrown
    • toString

      public String toString()
      Overrides:
      toString in class Object