Package org.apache.iceberg
Class GenericManifestFile
- java.lang.Object
-
- org.apache.iceberg.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 java.lang.Object implements ManifestFile, StructLike, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificData.SchemaConstructable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GenericManifestFile.CopyBuilder
-
Nested classes/interfaces inherited from interface org.apache.iceberg.ManifestFile
ManifestFile.PartitionFieldSummary
-
-
Field Summary
-
Fields inherited from interface org.apache.iceberg.ManifestFile
ADDED_FILES_COUNT, ADDED_ROWS_COUNT, DELETED_FILES_COUNT, DELETED_ROWS_COUNT, EXISTING_FILES_COUNT, EXISTING_ROWS_COUNT, LENGTH, MANIFEST_CONTENT, MIN_SEQUENCE_NUMBER, PARTITION_SUMMARIES, PARTITION_SUMMARY_TYPE, PATH, SCHEMA, SEQUENCE_NUMBER, SNAPSHOT_ID, SPEC_ID
-
-
Constructor Summary
Constructors Constructor Description 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)
GenericManifestFile(org.apache.avro.Schema avroSchema)
Used by Avro reflection to instantiate this class when reading manifest files.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
addedFilesCount()
java.lang.Long
addedRowsCount()
ManifestContent
content()
ManifestFile
copy()
Copies thismanifest file
.static GenericManifestFile.CopyBuilder
copyOf(ManifestFile manifestFile)
java.lang.Integer
deletedFilesCount()
java.lang.Long
deletedRowsCount()
boolean
equals(java.lang.Object other)
java.lang.Integer
existingFilesCount()
java.lang.Long
existingRowsCount()
java.lang.Object
get(int i)
<T> T
get(int pos, java.lang.Class<T> javaClass)
org.apache.avro.Schema
getSchema()
int
hashCode()
java.lang.Long
lazyLength()
long
length()
long
minSequenceNumber()
java.util.List<ManifestFile.PartitionFieldSummary>
partitions()
Returns a list ofpartition field summaries
.int
partitionSpecId()
java.lang.String
path()
void
put(int i, java.lang.Object v)
long
sequenceNumber()
<T> void
set(int i, T value)
int
size()
java.lang.Long
snapshotId()
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.ManifestFile
hasAddedFiles, hasDeletedFiles, hasExistingFiles
-
-
-
-
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)
-
-
Method Detail
-
path
public java.lang.String path()
- Specified by:
path
in interfaceManifestFile
- Returns:
- fully qualified path to the file, suitable for constructing a Hadoop Path
-
lazyLength
public java.lang.Long lazyLength()
-
length
public long length()
- Specified by:
length
in interfaceManifestFile
- Returns:
- length of the manifest file
-
partitionSpecId
public int partitionSpecId()
- Specified by:
partitionSpecId
in interfaceManifestFile
- Returns:
- ID of the
PartitionSpec
used to write the manifest file
-
content
public ManifestContent content()
- Specified by:
content
in interfaceManifestFile
- Returns:
- the content stored in the manifest; either DATA or DELETES
-
sequenceNumber
public long sequenceNumber()
- Specified by:
sequenceNumber
in interfaceManifestFile
- Returns:
- the sequence number of the commit that added the manifest file
-
minSequenceNumber
public long minSequenceNumber()
- Specified by:
minSequenceNumber
in interfaceManifestFile
- Returns:
- the lowest sequence number of any data file in the manifest
-
snapshotId
public java.lang.Long snapshotId()
- Specified by:
snapshotId
in interfaceManifestFile
- Returns:
- ID of the snapshot that added the manifest file to table metadata
-
addedFilesCount
public java.lang.Integer addedFilesCount()
- Specified by:
addedFilesCount
in interfaceManifestFile
- Returns:
- the number of data files with status ADDED in the manifest file
-
addedRowsCount
public java.lang.Long addedRowsCount()
- Specified by:
addedRowsCount
in interfaceManifestFile
- Returns:
- the total number of rows in all data files with status ADDED in the manifest file
-
existingFilesCount
public java.lang.Integer existingFilesCount()
- Specified by:
existingFilesCount
in interfaceManifestFile
- Returns:
- the number of data files with status EXISTING in the manifest file
-
existingRowsCount
public java.lang.Long existingRowsCount()
- Specified by:
existingRowsCount
in interfaceManifestFile
- Returns:
- the total number of rows in all data files with status EXISTING in the manifest file
-
deletedFilesCount
public java.lang.Integer deletedFilesCount()
- Specified by:
deletedFilesCount
in interfaceManifestFile
- Returns:
- the number of data files with status DELETED in the manifest file
-
deletedRowsCount
public java.lang.Long deletedRowsCount()
- Specified by:
deletedRowsCount
in interfaceManifestFile
- Returns:
- the total number of rows in all data files with status DELETED in the manifest file
-
partitions
public java.util.List<ManifestFile.PartitionFieldSummary> partitions()
Description copied from interface:ManifestFile
Returns a list ofpartition 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 interfaceManifestFile
- Returns:
- a list of partition field summaries, one for each field in the manifest's spec
-
size
public int size()
- Specified by:
size
in interfaceStructLike
-
get
public <T> T get(int pos, java.lang.Class<T> javaClass)
- Specified by:
get
in interfaceStructLike
-
get
public java.lang.Object get(int i)
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
-
set
public <T> void set(int i, T value)
- Specified by:
set
in interfaceStructLike
-
put
public void put(int i, java.lang.Object v)
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
-
copy
public ManifestFile copy()
Description copied from interface:ManifestFile
Copies thismanifest file
. Readers can reuse manifest file instances; use this method to make defensive copies.- Specified by:
copy
in interfaceManifestFile
- Returns:
- a copy of this manifest file
-
getSchema
public org.apache.avro.Schema getSchema()
- Specified by:
getSchema
in interfaceorg.apache.avro.generic.GenericContainer
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
copyOf
public static GenericManifestFile.CopyBuilder copyOf(ManifestFile manifestFile)
-
-