Package org.apache.iceberg
Interface ManifestFile
-
- All Known Implementing Classes:
GenericManifestFile
public interface ManifestFileRepresents 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 interfaceManifestFile.PartitionFieldSummarySummarizes the values of one partition field stored in a manifest file.
-
Field Summary
Fields Modifier and Type Field Description static Types.NestedFieldADDED_FILES_COUNTstatic Types.NestedFieldADDED_ROWS_COUNTstatic Types.NestedFieldDELETED_FILES_COUNTstatic Types.NestedFieldDELETED_ROWS_COUNTstatic Types.NestedFieldEXISTING_FILES_COUNTstatic Types.NestedFieldEXISTING_ROWS_COUNTstatic Types.NestedFieldLENGTHstatic Types.NestedFieldMANIFEST_CONTENTstatic Types.NestedFieldMIN_SEQUENCE_NUMBERstatic Types.NestedFieldPARTITION_SUMMARIESstatic Types.StructTypePARTITION_SUMMARY_TYPEstatic Types.NestedFieldPATHstatic SchemaSCHEMAstatic Types.NestedFieldSEQUENCE_NUMBERstatic Types.NestedFieldSNAPSHOT_IDstatic Types.NestedFieldSPEC_ID
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.IntegeraddedFilesCount()java.lang.LongaddedRowsCount()ManifestContentcontent()ManifestFilecopy()Copies thismanifest file.java.lang.IntegerdeletedFilesCount()java.lang.LongdeletedRowsCount()java.lang.IntegerexistingFilesCount()java.lang.LongexistingRowsCount()default booleanhasAddedFiles()Returns true if the manifest contains ADDED entries or if the count is not known.default booleanhasDeletedFiles()Returns true if the manifest contains DELETED entries or if the count is not known.default booleanhasExistingFiles()Returns true if the manifest contains EXISTING entries or if the count is not known.longlength()longminSequenceNumber()java.util.List<ManifestFile.PartitionFieldSummary>partitions()Returns a list ofpartition field summaries.intpartitionSpecId()java.lang.Stringpath()static Schemaschema()longsequenceNumber()java.lang.LongsnapshotId()
-
-
-
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
-
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 the
PartitionSpecused 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 sequence number of any data 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
-
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
-
-