Package org.apache.iceberg
Class TableMetadata.Builder
java.lang.Object
org.apache.iceberg.TableMetadata.Builder
- Enclosing class:
- TableMetadata
-
Method Summary
Modifier and TypeMethodDescriptionaddSnapshot
(Snapshot snapshot) addSortOrder
(SortOrder order) addSortOrder
(UnboundSortOrder order) assignUUID
(String newUuid) build()
removePartitionStatistics
(long snapshotId) removeProperties
(Set<String> removed) removeSnapshots
(Collection<Long> idsToRemove) removeSnapshots
(List<Snapshot> snapshotsToRemove) removeStatistics
(long snapshotId) setBranchSnapshot
(long snapshotId, String branch) setBranchSnapshot
(Snapshot snapshot, String branch) setCurrentSchema
(int schemaId) setCurrentSchema
(Schema newSchema, int newLastColumnId) setDefaultPartitionSpec
(int specId) setDefaultSortOrder
(int sortOrderId) setDefaultSortOrder
(SortOrder order) setLocation
(String newLocation) setPreviousFileLocation
(String previousFileLocation) setProperties
(Map<String, String> updated) setRef
(String name, SnapshotRef ref) setSnapshotsSupplier
(SerializableSupplier<List<Snapshot>> snapshotsSupplier) setStatistics
(long snapshotId, StatisticsFile statisticsFile) Suppresses snapshots that are historical, removing the metadata for lazy snapshot loading.upgradeFormatVersion
(int newFormatVersion) withMetadataLocation
(String newMetadataLocation)
-
Method Details
-
withMetadataLocation
-
assignUUID
-
assignUUID
-
upgradeFormatVersion
-
setCurrentSchema
-
setCurrentSchema
-
addSchema
-
setDefaultPartitionSpec
-
setDefaultPartitionSpec
-
addPartitionSpec
-
addPartitionSpec
-
setDefaultSortOrder
-
setDefaultSortOrder
-
addSortOrder
-
addSortOrder
-
addSnapshot
-
setSnapshotsSupplier
public TableMetadata.Builder setSnapshotsSupplier(SerializableSupplier<List<Snapshot>> snapshotsSupplier) -
setBranchSnapshot
-
setBranchSnapshot
-
setRef
-
removeRef
-
setStatistics
-
removeStatistics
-
suppressHistoricalSnapshots
Suppresses snapshots that are historical, removing the metadata for lazy snapshot loading.Note that the snapshots are not considered removed from metadata and no RemoveSnapshot changes are created.
A snapshot is historical if no ref directly references its ID.
- Returns:
- this for method chaining
-
setPartitionStatistics
-
removePartitionStatistics
-
removeSnapshots
-
removeSnapshots
-
setProperties
-
removeProperties
-
setLocation
-
discardChanges
-
setPreviousFileLocation
-
build
-