Package org.apache.iceberg
Interface ManifestFile
-
- All Known Implementing Classes:
GenericManifestFile
,ManifestFileBean
public interface ManifestFile
Represents a manifest file that can be scanned to find data files in a table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ManifestFile.PartitionFieldSummary
Summarizes the values of one partition field stored in a manifest file.
-
Field Summary
Fields Modifier and Type Field Description static Types.NestedField
ADDED_FILES_COUNT
static Types.NestedField
ADDED_ROWS_COUNT
static Types.NestedField
DELETED_FILES_COUNT
static Types.NestedField
DELETED_ROWS_COUNT
static Types.NestedField
EXISTING_FILES_COUNT
static Types.NestedField
EXISTING_ROWS_COUNT
static Types.NestedField
KEY_METADATA
static Types.NestedField
LENGTH
static Types.NestedField
MANIFEST_CONTENT
static Types.NestedField
MIN_SEQUENCE_NUMBER
static Types.NestedField
PARTITION_SUMMARIES
static Types.StructType
PARTITION_SUMMARY_TYPE
static Types.NestedField
PATH
static Schema
SCHEMA
static Types.NestedField
SEQUENCE_NUMBER
static Types.NestedField
SNAPSHOT_ID
static Types.NestedField
SPEC_ID
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Integer
addedFilesCount()
Returns the number of data files with status ADDED in the manifest file.java.lang.Long
addedRowsCount()
Returns the total number of rows in all data files with status ADDED in the manifest file.ManifestContent
content()
Returns the content stored in the manifest; either DATA or DELETES.ManifestFile
copy()
Copies thismanifest file
.java.lang.Integer
deletedFilesCount()
Returns the number of data files with status DELETED in the manifest file.java.lang.Long
deletedRowsCount()
Returns the total number of rows in all data files with status DELETED in the manifest file.java.lang.Integer
existingFilesCount()
Returns the number of data files with status EXISTING in the manifest file.java.lang.Long
existingRowsCount()
Returns the total number of rows in all data files with status EXISTING in the manifest file.default boolean
hasAddedFiles()
Returns true if the manifest contains ADDED entries or if the count is not known.default boolean
hasDeletedFiles()
Returns true if the manifest contains DELETED entries or if the count is not known.default boolean
hasExistingFiles()
Returns true if the manifest contains EXISTING entries or if the count is not known.default java.nio.ByteBuffer
keyMetadata()
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
minSequenceNumber()
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
.int
partitionSpecId()
Returns iD of thePartitionSpec
used to write the manifest file.java.lang.String
path()
Returns fully qualified path to the file, suitable for constructing a Hadoop Path.static Schema
schema()
long
sequenceNumber()
Returns the sequence number of the commit that added the manifest file.java.lang.Long
snapshotId()
Returns iD of the snapshot that added the manifest file to table metadata.
-
-
-
Field Detail
-
PATH
static final Types.NestedField PATH
-
LENGTH
static final Types.NestedField LENGTH
-
SPEC_ID
static final Types.NestedField SPEC_ID
-
MANIFEST_CONTENT
static final Types.NestedField MANIFEST_CONTENT
-
SEQUENCE_NUMBER
static final Types.NestedField SEQUENCE_NUMBER
-
MIN_SEQUENCE_NUMBER
static final Types.NestedField MIN_SEQUENCE_NUMBER
-
SNAPSHOT_ID
static final Types.NestedField SNAPSHOT_ID
-
ADDED_FILES_COUNT
static final Types.NestedField ADDED_FILES_COUNT
-
EXISTING_FILES_COUNT
static final Types.NestedField EXISTING_FILES_COUNT
-
DELETED_FILES_COUNT
static final Types.NestedField DELETED_FILES_COUNT
-
ADDED_ROWS_COUNT
static final Types.NestedField ADDED_ROWS_COUNT
-
EXISTING_ROWS_COUNT
static final Types.NestedField EXISTING_ROWS_COUNT
-
DELETED_ROWS_COUNT
static final Types.NestedField DELETED_ROWS_COUNT
-
PARTITION_SUMMARY_TYPE
static final Types.StructType PARTITION_SUMMARY_TYPE
-
PARTITION_SUMMARIES
static final Types.NestedField PARTITION_SUMMARIES
-
KEY_METADATA
static final Types.NestedField KEY_METADATA
-
SCHEMA
static final Schema SCHEMA
-
-
Method Detail
-
schema
static Schema schema()
-
path
java.lang.String path()
Returns fully qualified path to the file, suitable for constructing a Hadoop Path.
-
length
long length()
Returns length of the manifest file.
-
partitionSpecId
int partitionSpecId()
Returns iD of thePartitionSpec
used to write the manifest file.
-
content
ManifestContent content()
Returns the content stored in the manifest; either DATA or DELETES.
-
sequenceNumber
long sequenceNumber()
Returns the sequence number of the commit that added the manifest file.
-
minSequenceNumber
long minSequenceNumber()
Returns the lowest data sequence number of any live file in the manifest.
-
snapshotId
java.lang.Long snapshotId()
Returns iD of the snapshot that added the manifest file to table metadata.
-
hasAddedFiles
default boolean hasAddedFiles()
Returns true if the manifest contains ADDED entries or if the count is not known.- Returns:
- whether this manifest contains entries with ADDED status
-
addedFilesCount
java.lang.Integer addedFilesCount()
Returns the number of data files with status ADDED in the manifest file.
-
addedRowsCount
java.lang.Long addedRowsCount()
Returns the total number of rows in all data files with status ADDED in the manifest file.
-
hasExistingFiles
default boolean hasExistingFiles()
Returns true if the manifest contains EXISTING entries or if the count is not known.- Returns:
- whether this manifest contains entries with EXISTING status
-
existingFilesCount
java.lang.Integer existingFilesCount()
Returns the number of data files with status EXISTING in the manifest file.
-
existingRowsCount
java.lang.Long existingRowsCount()
Returns the total number of rows in all data files with status EXISTING in the manifest file.
-
hasDeletedFiles
default boolean hasDeletedFiles()
Returns true if the manifest contains DELETED entries or if the count is not known.- Returns:
- whether this manifest contains entries with DELETED status
-
deletedFilesCount
java.lang.Integer deletedFilesCount()
Returns the number of data files with status DELETED in the manifest file.
-
deletedRowsCount
java.lang.Long deletedRowsCount()
Returns the total number of rows in all data files with status DELETED in the manifest file.
-
partitions
java.util.List<ManifestFile.PartitionFieldSummary> partitions()
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.
- Returns:
- a list of partition field summaries, one for each field in the manifest's spec
-
keyMetadata
default java.nio.ByteBuffer keyMetadata()
Returns metadata about how this manifest file is encrypted, or null if the file is stored in plain text.
-
copy
ManifestFile copy()
Copies thismanifest file
. Readers can reuse manifest file instances; use this method to make defensive copies.- Returns:
- a copy of this manifest file
-
-