public class TableMetadata
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TableMetadata.Builder |
static class |
TableMetadata.MetadataLogEntry |
static class |
TableMetadata.SnapshotLogEntry |
Modifier and Type | Method and Description |
---|---|
static TableMetadata.Builder |
buildFrom(TableMetadata base) |
static TableMetadata.Builder |
buildFromEmpty() |
TableMetadata |
buildReplacement(Schema updatedSchema,
PartitionSpec updatedPartitionSpec,
SortOrder updatedSortOrder,
java.lang.String newLocation,
java.util.Map<java.lang.String,java.lang.String> updatedProperties) |
java.util.List<MetadataUpdate> |
changes() |
int |
currentSchemaId() |
Snapshot |
currentSnapshot() |
int |
defaultSortOrderId() |
int |
defaultSpecId() |
int |
formatVersion() |
int |
lastAssignedPartitionId() |
int |
lastColumnId() |
long |
lastSequenceNumber() |
long |
lastUpdatedMillis() |
java.lang.String |
location() |
java.lang.String |
metadataFileLocation() |
static TableMetadata |
newTableMetadata(Schema schema,
PartitionSpec spec,
SortOrder sortOrder,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties) |
static TableMetadata |
newTableMetadata(Schema schema,
PartitionSpec spec,
java.lang.String location,
java.util.Map<java.lang.String,java.lang.String> properties) |
long |
nextSequenceNumber() |
java.util.List<PartitionStatisticsFile> |
partitionStatisticsFiles() |
java.util.List<TableMetadata.MetadataLogEntry> |
previousFiles() |
java.util.Map<java.lang.String,java.lang.String> |
properties() |
java.lang.String |
property(java.lang.String property,
java.lang.String defaultValue) |
boolean |
propertyAsBoolean(java.lang.String property,
boolean defaultValue) |
int |
propertyAsInt(java.lang.String property,
int defaultValue) |
long |
propertyAsLong(java.lang.String property,
long defaultValue) |
SnapshotRef |
ref(java.lang.String name) |
java.util.Map<java.lang.String,SnapshotRef> |
refs() |
TableMetadata |
removeSnapshotsIf(java.util.function.Predicate<Snapshot> removeIf) |
TableMetadata |
replaceProperties(java.util.Map<java.lang.String,java.lang.String> rawProperties) |
TableMetadata |
replaceSortOrder(SortOrder newOrder) |
Schema |
schema() |
java.util.List<Schema> |
schemas() |
java.util.Map<java.lang.Integer,Schema> |
schemasById() |
Snapshot |
snapshot(long snapshotId) |
java.util.List<HistoryEntry> |
snapshotLog() |
java.util.List<Snapshot> |
snapshots() |
SortOrder |
sortOrder() |
java.util.List<SortOrder> |
sortOrders() |
java.util.Map<java.lang.Integer,SortOrder> |
sortOrdersById() |
PartitionSpec |
spec() |
PartitionSpec |
spec(int id) |
java.util.List<PartitionSpec> |
specs() |
java.util.Map<java.lang.Integer,PartitionSpec> |
specsById() |
java.util.List<StatisticsFile> |
statisticsFiles() |
TableMetadata |
updateLocation(java.lang.String newLocation) |
TableMetadata |
updatePartitionSpec(PartitionSpec newPartitionSpec) |
TableMetadata |
updateSchema(Schema newSchema,
int newLastColumnId) |
TableMetadata |
upgradeToFormatVersion(int newFormatVersion) |
java.lang.String |
uuid() |
TableMetadata |
withUUID() |
public static TableMetadata newTableMetadata(Schema schema, PartitionSpec spec, SortOrder sortOrder, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
public static TableMetadata newTableMetadata(Schema schema, PartitionSpec spec, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> properties)
public int formatVersion()
public java.lang.String metadataFileLocation()
public java.lang.String uuid()
public long lastSequenceNumber()
public long nextSequenceNumber()
public long lastUpdatedMillis()
public int lastColumnId()
public Schema schema()
public java.util.List<Schema> schemas()
public java.util.Map<java.lang.Integer,Schema> schemasById()
public int currentSchemaId()
public PartitionSpec spec()
public PartitionSpec spec(int id)
public java.util.List<PartitionSpec> specs()
public java.util.Map<java.lang.Integer,PartitionSpec> specsById()
public int lastAssignedPartitionId()
public int defaultSpecId()
public int defaultSortOrderId()
public SortOrder sortOrder()
public java.util.List<SortOrder> sortOrders()
public java.util.Map<java.lang.Integer,SortOrder> sortOrdersById()
public java.lang.String location()
public java.util.Map<java.lang.String,java.lang.String> properties()
public java.lang.String property(java.lang.String property, java.lang.String defaultValue)
public boolean propertyAsBoolean(java.lang.String property, boolean defaultValue)
public int propertyAsInt(java.lang.String property, int defaultValue)
public long propertyAsLong(java.lang.String property, long defaultValue)
public Snapshot snapshot(long snapshotId)
public Snapshot currentSnapshot()
public java.util.List<Snapshot> snapshots()
public SnapshotRef ref(java.lang.String name)
public java.util.Map<java.lang.String,SnapshotRef> refs()
public java.util.List<StatisticsFile> statisticsFiles()
public java.util.List<PartitionStatisticsFile> partitionStatisticsFiles()
public java.util.List<HistoryEntry> snapshotLog()
public java.util.List<TableMetadata.MetadataLogEntry> previousFiles()
public java.util.List<MetadataUpdate> changes()
public TableMetadata withUUID()
public TableMetadata updateSchema(Schema newSchema, int newLastColumnId)
public TableMetadata updatePartitionSpec(PartitionSpec newPartitionSpec)
public TableMetadata replaceSortOrder(SortOrder newOrder)
public TableMetadata removeSnapshotsIf(java.util.function.Predicate<Snapshot> removeIf)
public TableMetadata replaceProperties(java.util.Map<java.lang.String,java.lang.String> rawProperties)
public TableMetadata buildReplacement(Schema updatedSchema, PartitionSpec updatedPartitionSpec, SortOrder updatedSortOrder, java.lang.String newLocation, java.util.Map<java.lang.String,java.lang.String> updatedProperties)
public TableMetadata updateLocation(java.lang.String newLocation)
public TableMetadata upgradeToFormatVersion(int newFormatVersion)
public static TableMetadata.Builder buildFrom(TableMetadata base)
public static TableMetadata.Builder buildFromEmpty()