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
Modifier 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
boolean
propertyAsBoolean
(String property, boolean defaultValue) int
propertyAsInt
(String property, int defaultValue) long
propertyAsLong
(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
-