Package org.apache.iceberg.spark.actions
Class ManifestFileBean
- java.lang.Object
-
- org.apache.iceberg.spark.actions.ManifestFileBean
-
- All Implemented Interfaces:
java.io.Serializable,ManifestFile
public class ManifestFileBean extends java.lang.Object implements ManifestFile, java.io.Serializable
A serializable bean that contains a bare minimum to read a manifest.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iceberg.ManifestFile
ManifestFile.PartitionFieldSummary
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.spark.sql.Encoder<ManifestFileBean>ENCODER-
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
Constructors Constructor Description ManifestFileBean()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegeraddedFilesCount()Returns the number of data files with status ADDED in the manifest file.java.lang.LongaddedRowsCount()Returns the total number of rows in all data files with status ADDED in the manifest file.ManifestContentcontent()Returns the content stored in the manifest; either DATA or DELETES.ManifestFilecopy()Copies thismanifest file.java.lang.IntegerdeletedFilesCount()Returns the number of data files with status DELETED in the manifest file.java.lang.LongdeletedRowsCount()Returns the total number of rows in all data files with status DELETED in the manifest file.java.lang.IntegerexistingFilesCount()Returns the number of data files with status EXISTING in the manifest file.java.lang.LongexistingRowsCount()Returns the total number of rows in all data files with status EXISTING in the manifest file.static ManifestFileBeanfromManifest(ManifestFile manifest)java.lang.LonggetAddedSnapshotId()java.lang.IntegergetContent()java.lang.LonggetLength()java.lang.IntegergetPartitionSpecId()java.lang.StringgetPath()java.lang.LonggetSequenceNumber()java.nio.ByteBufferkeyMetadata()Returns metadata about how this manifest file is encrypted, or null if the file is stored in plain text.longlength()Returns length of the manifest file.longminSequenceNumber()Returns the lowest data sequence number of any live file in the manifest.java.util.List<ManifestFile.PartitionFieldSummary>partitions()Returns a list ofpartition field summaries.intpartitionSpecId()Returns iD of thePartitionSpecused to write the manifest file.java.lang.Stringpath()Returns fully qualified path to the file, suitable for constructing a Hadoop Path.longsequenceNumber()Returns the sequence number of the commit that added the manifest file.voidsetAddedSnapshotId(java.lang.Long addedSnapshotId)voidsetContent(java.lang.Integer content)voidsetLength(java.lang.Long length)voidsetPartitionSpecId(java.lang.Integer partitionSpecId)voidsetPath(java.lang.String path)voidsetSequenceNumber(java.lang.Long sequenceNumber)java.lang.LongsnapshotId()Returns iD of the snapshot that added the manifest file to table metadata.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.ManifestFile
hasAddedFiles, hasDeletedFiles, hasExistingFiles
-
-
-
-
Field Detail
-
ENCODER
public static final org.apache.spark.sql.Encoder<ManifestFileBean> ENCODER
-
-
Method Detail
-
fromManifest
public static ManifestFileBean fromManifest(ManifestFile manifest)
-
getPath
public java.lang.String getPath()
-
setPath
public void setPath(java.lang.String path)
-
getLength
public java.lang.Long getLength()
-
setLength
public void setLength(java.lang.Long length)
-
getPartitionSpecId
public java.lang.Integer getPartitionSpecId()
-
setPartitionSpecId
public void setPartitionSpecId(java.lang.Integer partitionSpecId)
-
getAddedSnapshotId
public java.lang.Long getAddedSnapshotId()
-
setAddedSnapshotId
public void setAddedSnapshotId(java.lang.Long addedSnapshotId)
-
getContent
public java.lang.Integer getContent()
-
setContent
public void setContent(java.lang.Integer content)
-
getSequenceNumber
public java.lang.Long getSequenceNumber()
-
setSequenceNumber
public void setSequenceNumber(java.lang.Long sequenceNumber)
-
path
public java.lang.String path()
Description copied from interface:ManifestFileReturns fully qualified path to the file, suitable for constructing a Hadoop Path.- Specified by:
pathin interfaceManifestFile
-
length
public long length()
Description copied from interface:ManifestFileReturns length of the manifest file.- Specified by:
lengthin interfaceManifestFile
-
partitionSpecId
public int partitionSpecId()
Description copied from interface:ManifestFileReturns iD of thePartitionSpecused to write the manifest file.- Specified by:
partitionSpecIdin interfaceManifestFile
-
content
public ManifestContent content()
Description copied from interface:ManifestFileReturns the content stored in the manifest; either DATA or DELETES.- Specified by:
contentin interfaceManifestFile
-
sequenceNumber
public long sequenceNumber()
Description copied from interface:ManifestFileReturns the sequence number of the commit that added the manifest file.- Specified by:
sequenceNumberin interfaceManifestFile
-
minSequenceNumber
public long minSequenceNumber()
Description copied from interface:ManifestFileReturns the lowest data sequence number of any live file in the manifest.- Specified by:
minSequenceNumberin interfaceManifestFile
-
snapshotId
public java.lang.Long snapshotId()
Description copied from interface:ManifestFileReturns iD of the snapshot that added the manifest file to table metadata.- Specified by:
snapshotIdin interfaceManifestFile
-
addedFilesCount
public java.lang.Integer addedFilesCount()
Description copied from interface:ManifestFileReturns the number of data files with status ADDED in the manifest file.- Specified by:
addedFilesCountin interfaceManifestFile
-
addedRowsCount
public java.lang.Long addedRowsCount()
Description copied from interface:ManifestFileReturns the total number of rows in all data files with status ADDED in the manifest file.- Specified by:
addedRowsCountin interfaceManifestFile
-
existingFilesCount
public java.lang.Integer existingFilesCount()
Description copied from interface:ManifestFileReturns the number of data files with status EXISTING in the manifest file.- Specified by:
existingFilesCountin interfaceManifestFile
-
existingRowsCount
public java.lang.Long existingRowsCount()
Description copied from interface:ManifestFileReturns the total number of rows in all data files with status EXISTING in the manifest file.- Specified by:
existingRowsCountin interfaceManifestFile
-
deletedFilesCount
public java.lang.Integer deletedFilesCount()
Description copied from interface:ManifestFileReturns the number of data files with status DELETED in the manifest file.- Specified by:
deletedFilesCountin interfaceManifestFile
-
deletedRowsCount
public java.lang.Long deletedRowsCount()
Description copied from interface:ManifestFileReturns the total number of rows in all data files with status DELETED in the manifest file.- Specified by:
deletedRowsCountin interfaceManifestFile
-
partitions
public java.util.List<ManifestFile.PartitionFieldSummary> partitions()
Description copied from interface:ManifestFileReturns 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:
partitionsin interfaceManifestFile- 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:ManifestFileReturns metadata about how this manifest file is encrypted, or null if the file is stored in plain text.- Specified by:
keyMetadatain interfaceManifestFile
-
copy
public ManifestFile copy()
Description copied from interface:ManifestFileCopies thismanifest file. Readers can reuse manifest file instances; use this method to make defensive copies.- Specified by:
copyin interfaceManifestFile- Returns:
- a copy of this manifest file
-
-