Class GenericManifestFile

All Implemented Interfaces:
Serializable, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificData.SchemaConstructable, ManifestFile, StructLike

public class GenericManifestFile extends SupportsIndexProjection implements ManifestFile, StructLike, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificData.SchemaConstructable, Serializable
See Also:
  • Constructor Details

    • GenericManifestFile

      public GenericManifestFile(org.apache.avro.Schema avroSchema)
      Used by Avro reflection to instantiate this class when reading manifest files.
    • GenericManifestFile

      public GenericManifestFile(String path, long length, int specId, ManifestContent content, long sequenceNumber, long minSequenceNumber, Long snapshotId, int addedFilesCount, long addedRowsCount, int existingFilesCount, long existingRowsCount, int deletedFilesCount, long deletedRowsCount, List<ManifestFile.PartitionFieldSummary> partitions, ByteBuffer keyMetadata)
  • Method Details

    • path

      public String path()
      Description copied from interface: ManifestFile
      Returns fully qualified path to the file, suitable for constructing a Hadoop Path.
      Specified by:
      path in interface ManifestFile
    • lazyLength

      public Long lazyLength()
    • length

      public long length()
      Description copied from interface: ManifestFile
      Returns length of the manifest file.
      Specified by:
      length in interface ManifestFile
    • partitionSpecId

      public int partitionSpecId()
      Description copied from interface: ManifestFile
      Returns iD of the PartitionSpec used to write the manifest file.
      Specified by:
      partitionSpecId in interface ManifestFile
    • content

      public ManifestContent content()
      Description copied from interface: ManifestFile
      Returns the content stored in the manifest; either DATA or DELETES.
      Specified by:
      content in interface ManifestFile
    • sequenceNumber

      public long sequenceNumber()
      Description copied from interface: ManifestFile
      Returns the sequence number of the commit that added the manifest file.
      Specified by:
      sequenceNumber in interface ManifestFile
    • minSequenceNumber

      public long minSequenceNumber()
      Description copied from interface: ManifestFile
      Returns the lowest data sequence number of any live file in the manifest.
      Specified by:
      minSequenceNumber in interface ManifestFile
    • snapshotId

      public Long snapshotId()
      Description copied from interface: ManifestFile
      Returns iD of the snapshot that added the manifest file to table metadata.
      Specified by:
      snapshotId in interface ManifestFile
    • addedFilesCount

      public Integer addedFilesCount()
      Description copied from interface: ManifestFile
      Returns the number of files with status ADDED in the manifest file.
      Specified by:
      addedFilesCount in interface ManifestFile
    • addedRowsCount

      public Long addedRowsCount()
      Description copied from interface: ManifestFile
      Returns the total number of rows in all files with status ADDED in the manifest file.
      Specified by:
      addedRowsCount in interface ManifestFile
    • existingFilesCount

      public Integer existingFilesCount()
      Description copied from interface: ManifestFile
      Returns the number of files with status EXISTING in the manifest file.
      Specified by:
      existingFilesCount in interface ManifestFile
    • existingRowsCount

      public Long existingRowsCount()
      Description copied from interface: ManifestFile
      Returns the total number of rows in all files with status EXISTING in the manifest file.
      Specified by:
      existingRowsCount in interface ManifestFile
    • deletedFilesCount

      public Integer deletedFilesCount()
      Description copied from interface: ManifestFile
      Returns the number of files with status DELETED in the manifest file.
      Specified by:
      deletedFilesCount in interface ManifestFile
    • deletedRowsCount

      public Long deletedRowsCount()
      Description copied from interface: ManifestFile
      Returns the total number of rows in all files with status DELETED in the manifest file.
      Specified by:
      deletedRowsCount in interface ManifestFile
    • partitions

      Description copied from interface: ManifestFile
      Returns a list of partition field summaries.

      Each summary corresponds to a field in the manifest file's partition spec, by ordinal. For example, the partition spec [ ts_day=date(ts), type=identity(type) ] will have 2 summaries. The first summary is for the ts_day partition field and the second is for the type partition field.

      Specified by:
      partitions in interface ManifestFile
      Returns:
      a list of partition field summaries, one for each field in the manifest's spec
    • keyMetadata

      public ByteBuffer keyMetadata()
      Description copied from interface: ManifestFile
      Returns metadata about how this manifest file is encrypted, or null if the file is stored in plain text.
      Specified by:
      keyMetadata in interface ManifestFile
    • size

      public int size()
      Specified by:
      size in interface StructLike
      Overrides:
      size in class SupportsIndexProjection
    • get

      public Object get(int pos)
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
    • internalGet

      protected <T> T internalGet(int pos, Class<T> javaClass)
      Specified by:
      internalGet in class SupportsIndexProjection
    • internalSet

      protected <T> void internalSet(int basePos, T value)
      Specified by:
      internalSet in class SupportsIndexProjection
    • put

      public void put(int i, Object v)
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
    • copy

      public ManifestFile copy()
      Description copied from interface: ManifestFile
      Copies this manifest file. Readers can reuse manifest file instances; use this method to make defensive copies.
      Specified by:
      copy in interface ManifestFile
      Returns:
      a copy of this manifest file
    • getSchema

      public org.apache.avro.Schema getSchema()
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copyOf

      public static GenericManifestFile.CopyBuilder copyOf(ManifestFile manifestFile)