Interface ParsedFooter


@Experimental public interface ParsedFooter

The parsed footer of one file, as a MetadataSource hands it to a reader.

Instances come from readFrom(InputFile), so each one carries the lengths and the identity of the file it was read from. A ParsedFooter is immutable and can be shared by any number of readers on any threads. It is held in memory and has no serialized form. This interface is not meant to be implemented outside Hardwood.

  • Method Details

    • readFrom

      static ParsedFooter readFrom(InputFile openFile) throws IOException
      Reads and parses the footer of an opened file.
      Parameters:
      openFile - a file on which InputFile.open() has been called; it stays open
      Returns:
      the file's footer
      Throws:
      IOException - if the file cannot be read
      ParquetReadException - if the file is not a valid Parquet file
      IllegalStateException - if the backend resolves the file's identity in InputFile.open() and openFile has not been opened
    • metaData

      FileMetaData metaData()
      The file's metadata as stated in its footer.
    • footerLength

      long footerLength()
      The length in bytes of the serialized footer, excluding the trailing length field and magic number.
    • sourceIdentity

      Optional<String> sourceIdentity()
      The InputFile.identity() of the file the footer was read from; empty when that file had none.