Package org.apache.iceberg
Class GenericManifestFile
java.lang.Object
org.apache.iceberg.avro.SupportsIndexProjection
org.apache.iceberg.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:
-
Nested Class Summary
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, KEY_METADATA, LENGTH, MANIFEST_CONTENT, MIN_SEQUENCE_NUMBER, PARTITION_SUMMARIES, PARTITION_SUMMARY_TYPE, PATH, SCHEMA, SEQUENCE_NUMBER, SNAPSHOT_ID, SPEC_ID
-
Constructor Summary
ConstructorDescriptionGenericManifestFile
(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) GenericManifestFile
(org.apache.avro.Schema avroSchema) Used by Avro reflection to instantiate this class when reading manifest files. -
Method Summary
Modifier and TypeMethodDescriptionReturns the number of files with status ADDED in the manifest file.Returns the total number of rows in all files with status ADDED in the manifest file.content()
Returns the content stored in the manifest; either DATA or DELETES.copy()
Copies thismanifest file
.copyOf
(ManifestFile manifestFile) Returns the number of files with status DELETED in the manifest file.Returns the total number of rows in all files with status DELETED in the manifest file.boolean
Returns the number of files with status EXISTING in the manifest file.Returns the total number of rows in all files with status EXISTING in the manifest file.get
(int pos) org.apache.avro.Schema
int
hashCode()
protected <T> T
internalGet
(int pos, Class<T> javaClass) protected <T> void
internalSet
(int basePos, T value) Returns metadata about how this manifest file is encrypted, or null if the file is stored in plain text.long
length()
Returns length of the manifest file.long
Returns the lowest data sequence number of any live file in the manifest.Returns a list ofpartition field summaries
.int
Returns iD of thePartitionSpec
used to write the manifest file.path()
Returns fully qualified path to the file, suitable for constructing a Hadoop Path.void
long
Returns the sequence number of the commit that added the manifest file.int
size()
Returns iD of the snapshot that added the manifest file to table metadata.toString()
Methods inherited from class org.apache.iceberg.avro.SupportsIndexProjection
get, set
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
Methods inherited from interface org.apache.iceberg.StructLike
get, set
-
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
Description copied from interface:ManifestFile
Returns fully qualified path to the file, suitable for constructing a Hadoop Path.- Specified by:
path
in interfaceManifestFile
-
lazyLength
-
length
public long length()Description copied from interface:ManifestFile
Returns length of the manifest file.- Specified by:
length
in interfaceManifestFile
-
partitionSpecId
public int partitionSpecId()Description copied from interface:ManifestFile
Returns iD of thePartitionSpec
used to write the manifest file.- Specified by:
partitionSpecId
in interfaceManifestFile
-
content
Description copied from interface:ManifestFile
Returns the content stored in the manifest; either DATA or DELETES.- Specified by:
content
in interfaceManifestFile
-
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 interfaceManifestFile
-
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 interfaceManifestFile
-
snapshotId
Description copied from interface:ManifestFile
Returns iD of the snapshot that added the manifest file to table metadata.- Specified by:
snapshotId
in interfaceManifestFile
-
addedFilesCount
Description copied from interface:ManifestFile
Returns the number of files with status ADDED in the manifest file.- Specified by:
addedFilesCount
in interfaceManifestFile
-
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 interfaceManifestFile
-
existingFilesCount
Description copied from interface:ManifestFile
Returns the number of files with status EXISTING in the manifest file.- Specified by:
existingFilesCount
in interfaceManifestFile
-
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 interfaceManifestFile
-
deletedFilesCount
Description copied from interface:ManifestFile
Returns the number of files with status DELETED in the manifest file.- Specified by:
deletedFilesCount
in interfaceManifestFile
-
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 interfaceManifestFile
-
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
-
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 interfaceManifestFile
-
size
public int size()- Specified by:
size
in interfaceStructLike
- Overrides:
size
in classSupportsIndexProjection
-
get
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
-
internalGet
- Specified by:
internalGet
in classSupportsIndexProjection
-
internalSet
protected <T> void internalSet(int basePos, T value) - Specified by:
internalSet
in classSupportsIndexProjection
-
put
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
-
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
-
hashCode
public int hashCode() -
toString
-
copyOf
-