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 classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionaddPartitionSpec(PartitionSpec newPartitionSpec) static TableMetadata.BuilderbuildFrom(TableMetadata base) static TableMetadata.Builderstatic TableMetadata.BuilderbuildFromEmpty(int formatVersion) buildReplacement(Schema updatedSchema, PartitionSpec updatedPartitionSpec, SortOrder updatedSortOrder, String newLocation, Map<String, String> updatedProperties) changes()intintintintintintlonglonglocation()static TableMetadatanewTableMetadata(Schema schema, PartitionSpec spec, String location, Map<String, String> properties) static TableMetadatanewTableMetadata(Schema schema, PartitionSpec spec, SortOrder sortOrder, String location, Map<String, String> properties) longbooleanpropertyAsBoolean(String property, boolean defaultValue) intpropertyAsInt(String property, int defaultValue) longpropertyAsLong(String property, long defaultValue) refs()removeSnapshotsIf(Predicate<Snapshot> removeIf) replaceProperties(Map<String, String> rawProperties) replaceSortOrder(SortOrder newOrder) schema()schemas()snapshot(long snapshotId) spec()spec(int id) specs()updateLocation(String newLocation) updatePartitionSpec(PartitionSpec newPartitionSpec) updateSchema(Schema newSchema, int newLastColumnId) 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
-
propertyAsLong
-
snapshot
-
currentSnapshot
-
snapshots
-
ref
-
refs
-
statisticsFiles
-
partitionStatisticsFiles
-
snapshotLog
-
previousFiles
-
changes
-
withUUID
-
updateSchema
-
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
-