Package org.apache.iceberg
Class TableMetadata
java.lang.Object
org.apache.iceberg.TableMetadata
- All Implemented Interfaces:
Serializable
Metadata for a table.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionaddPartitionSpec
(PartitionSpec newPartitionSpec) static TableMetadata.Builder
buildFrom
(TableMetadata base) static TableMetadata.Builder
static TableMetadata.Builder
buildFromEmpty
(int formatVersion) buildReplacement
(Schema updatedSchema, PartitionSpec updatedPartitionSpec, SortOrder updatedSortOrder, String newLocation, Map<String, String> updatedProperties) changes()
int
int
int
int
int
int
long
long
location()
static TableMetadata
newTableMetadata
(Schema schema, PartitionSpec spec, String location, Map<String, String> properties) static TableMetadata
newTableMetadata
(Schema schema, PartitionSpec spec, SortOrder sortOrder, String location, Map<String, String> properties) long
long
boolean
propertyAsBoolean
(String property, boolean defaultValue) int
propertyAsInt
(String property, int defaultValue) long
propertyAsLong
(String property, long defaultValue) int
propertyTryAsInt
(String property, int defaultValue) refs()
removeSnapshotsIf
(Predicate<Snapshot> removeIf) replaceProperties
(Map<String, String> rawProperties) replaceSortOrder
(SortOrder newOrder) boolean
schema()
schemas()
snapshot
(long snapshotId) spec()
spec
(int id) specs()
updateLocation
(String newLocation) updatePartitionSpec
(PartitionSpec newPartitionSpec) updateSchema
(Schema newSchema) Updates the schemaupdateSchema
(Schema newSchema, int newLastColumnId) Deprecated.since 1.8.0, will be removed in 1.9.0 or 2.0.0, use updateSchema(schema).upgradeToFormatVersion
(int newFormatVersion) uuid()
withUUID()
-
Method Details
-
newTableMetadata
public static TableMetadata newTableMetadata(Schema schema, PartitionSpec spec, SortOrder sortOrder, String location, Map<String, String> properties) -
newTableMetadata
public static TableMetadata newTableMetadata(Schema schema, PartitionSpec spec, String location, Map<String, String> properties) -
formatVersion
public int formatVersion() -
metadataFileLocation
-
uuid
-
lastSequenceNumber
public long lastSequenceNumber() -
nextSequenceNumber
public long nextSequenceNumber() -
lastUpdatedMillis
public long lastUpdatedMillis() -
lastColumnId
public int lastColumnId() -
schema
-
schemas
-
schemasById
-
currentSchemaId
public int currentSchemaId() -
spec
-
spec
-
specs
-
specsById
-
lastAssignedPartitionId
public int lastAssignedPartitionId() -
defaultSpecId
public int defaultSpecId() -
defaultSortOrderId
public int defaultSortOrderId() -
sortOrder
-
sortOrders
-
sortOrdersById
-
location
-
properties
-
property
-
propertyAsBoolean
-
propertyAsInt
-
propertyTryAsInt
-
propertyAsLong
-
snapshot
-
currentSnapshot
-
snapshots
-
ref
-
refs
-
statisticsFiles
-
partitionStatisticsFiles
-
snapshotLog
-
previousFiles
-
changes
-
withUUID
-
rowLineageEnabled
public boolean rowLineageEnabled() -
nextRowId
public long nextRowId() -
updateSchema
Deprecated.since 1.8.0, will be removed in 1.9.0 or 2.0.0, use updateSchema(schema).Updates the schema -
updateSchema
Updates the schema -
updatePartitionSpec
-
addPartitionSpec
-
replaceSortOrder
-
removeSnapshotsIf
-
replaceProperties
-
buildReplacement
public TableMetadata buildReplacement(Schema updatedSchema, PartitionSpec updatedPartitionSpec, SortOrder updatedSortOrder, String newLocation, Map<String, String> updatedProperties) -
updateLocation
-
upgradeToFormatVersion
-
buildFrom
-
buildFromEmpty
-
buildFromEmpty
-