Class GenericManifestFile

  • All Implemented Interfaces:
    java.io.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, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • GenericManifestFile

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

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

      • path

        public java.lang.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 java.lang.Long lazyLength()
      • length

        public long length()
        Description copied from interface: ManifestFile
        Returns length of the manifest file.
        Specified by:
        length 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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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

        public java.util.List<ManifestFile.PartitionFieldSummary> 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 java.nio.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
      • get

        public java.lang.Object get​(int pos)
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
      • put

        public void put​(int i,
                        java.lang.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​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object