Package org.apache.iceberg
Class ManifestsTable
- java.lang.Object
-
- org.apache.iceberg.ManifestsTable
-
-
Constructor Summary
Constructors Constructor Description ManifestsTable(TableOperations ops, Table table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnapshotcurrentSnapshot()Get the currentsnapshotfor this table, or null if there are no snapshots.EncryptionManagerencryption()ExpireSnapshotsexpireSnapshots()Create a newexpire APIto manage snapshots in this table and commit.java.util.List<HistoryEntry>history()Get the snapshot history of this table.FileIOio()java.lang.Stringlocation()Return the table's base location.LocationProviderlocationProvider()ManageSnapshotsmanageSnapshots()Create a newmanage snapshots APIto manage snapshots in this table and commit.AppendFilesnewAppend()Create a newappend APIto add files to this table and commit.DeleteFilesnewDelete()Create a newdelete APIto replace files in this table and commit.OverwriteFilesnewOverwrite()Create a newoverwrite APIto overwrite files by a filter expression.ReplacePartitionsnewReplacePartitions()Not recommended: Create a newreplace partitions APIto dynamically overwrite partitions in the table with new data.RewriteFilesnewRewrite()Create a newrewrite APIto replace files in this table and commit.RowDeltanewRowDelta()Create a newrow-level delta APIto remove or replace rows in existing data files.TableScannewScan()Create a newscanfor this table.TransactionnewTransaction()Create a newtransaction APIto commit multiple table operations at once.java.util.Map<java.lang.String,java.lang.String>properties()Return a map of string properties for this table.voidrefresh()Refresh the current table metadata.RewriteManifestsrewriteManifests()Create a newrewrite manifests APIto replace manifests for this table and commit.Rollbackrollback()Create a newrollback APIto roll back to a previous snapshot and commit.Schemaschema()Return theschemafor this table.Snapshotsnapshot(long snapshotId)Get thesnapshotof this table with the given id, or null if there is no matching snapshot.java.lang.Iterable<Snapshot>snapshots()Get thesnapshotsof this table.PartitionSpecspec()Return thepartition specfor this table.java.util.Map<java.lang.Integer,PartitionSpec>specs()Return a map ofpartition specsfor this table.protected DataTasktask(TableScan scan)java.lang.StringtoString()UpdateLocationupdateLocation()Create a newUpdateLocationto update table location and commit the changes.UpdatePropertiesupdateProperties()Create a newUpdatePropertiesto update table properties and commit the changes.UpdateSchemaupdateSchema()Create a newUpdateSchemato alter the columns of this table and commit the change.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.Table
newFastAppend
-
-
-
-
Constructor Detail
-
ManifestsTable
public ManifestsTable(TableOperations ops, Table table)
-
-
Method Detail
-
newScan
public TableScan newScan()
Description copied from interface:TableCreate a newscanfor this table.Once a table scan is created, it can be refined to project columns and filter data.
- Returns:
- a table scan for this table
-
schema
public Schema schema()
Description copied from interface:TableReturn theschemafor this table.- Returns:
- this table's schema
-
io
public FileIO io()
-
location
public java.lang.String location()
Description copied from interface:TableReturn the table's base location.
-
encryption
public EncryptionManager encryption()
- Specified by:
encryptionin interfaceTable- Returns:
- an
EncryptionManagerto encrypt and decrypt data files.
-
locationProvider
public LocationProvider locationProvider()
- Specified by:
locationProviderin interfaceTable- Returns:
- a
LocationProviderto provide locations for new data files
-
refresh
public void refresh()
Description copied from interface:TableRefresh the current table metadata.
-
spec
public PartitionSpec spec()
Description copied from interface:TableReturn thepartition specfor this table.
-
specs
public java.util.Map<java.lang.Integer,PartitionSpec> specs()
Description copied from interface:TableReturn a map ofpartition specsfor this table.
-
properties
public java.util.Map<java.lang.String,java.lang.String> properties()
Description copied from interface:TableReturn a map of string properties for this table.- Specified by:
propertiesin interfaceTable- Returns:
- this table's properties map
-
currentSnapshot
public Snapshot currentSnapshot()
Description copied from interface:TableGet the currentsnapshotfor this table, or null if there are no snapshots.- Specified by:
currentSnapshotin interfaceTable- Returns:
- the current table Snapshot.
-
snapshots
public java.lang.Iterable<Snapshot> snapshots()
Description copied from interface:TableGet thesnapshotsof this table.
-
snapshot
public Snapshot snapshot(long snapshotId)
Description copied from interface:TableGet thesnapshotof this table with the given id, or null if there is no matching snapshot.
-
history
public java.util.List<HistoryEntry> history()
Description copied from interface:TableGet the snapshot history of this table.- Specified by:
historyin interfaceTable- Returns:
- a list of
history entries
-
updateSchema
public UpdateSchema updateSchema()
Description copied from interface:TableCreate a newUpdateSchemato alter the columns of this table and commit the change.- Specified by:
updateSchemain interfaceTable- Returns:
- a new
UpdateSchema
-
updateProperties
public UpdateProperties updateProperties()
Description copied from interface:TableCreate a newUpdatePropertiesto update table properties and commit the changes.- Specified by:
updatePropertiesin interfaceTable- Returns:
- a new
UpdateProperties
-
updateLocation
public UpdateLocation updateLocation()
Description copied from interface:TableCreate a newUpdateLocationto update table location and commit the changes.- Specified by:
updateLocationin interfaceTable- Returns:
- a new
UpdateLocation
-
newAppend
public AppendFiles newAppend()
Description copied from interface:TableCreate a newappend APIto add files to this table and commit.- Specified by:
newAppendin interfaceTable- Returns:
- a new
AppendFiles
-
newRewrite
public RewriteFiles newRewrite()
Description copied from interface:TableCreate a newrewrite APIto replace files in this table and commit.- Specified by:
newRewritein interfaceTable- Returns:
- a new
RewriteFiles
-
rewriteManifests
public RewriteManifests rewriteManifests()
Description copied from interface:TableCreate a newrewrite manifests APIto replace manifests for this table and commit.- Specified by:
rewriteManifestsin interfaceTable- Returns:
- a new
RewriteManifests
-
newOverwrite
public OverwriteFiles newOverwrite()
Description copied from interface:TableCreate a newoverwrite APIto overwrite files by a filter expression.- Specified by:
newOverwritein interfaceTable- Returns:
- a new
OverwriteFiles
-
newRowDelta
public RowDelta newRowDelta()
Description copied from interface:TableCreate a newrow-level delta APIto remove or replace rows in existing data files.- Specified by:
newRowDeltain interfaceTable- Returns:
- a new
RowDelta
-
newReplacePartitions
public ReplacePartitions newReplacePartitions()
Description copied from interface:TableNot recommended: Create a newreplace partitions APIto dynamically overwrite partitions in the table with new data.This is provided to implement SQL compatible with Hive table operations but is not recommended. Instead, use the
overwrite APIto explicitly overwrite data.- Specified by:
newReplacePartitionsin interfaceTable- Returns:
- a new
ReplacePartitions
-
newDelete
public DeleteFiles newDelete()
Description copied from interface:TableCreate a newdelete APIto replace files in this table and commit.- Specified by:
newDeletein interfaceTable- Returns:
- a new
DeleteFiles
-
expireSnapshots
public ExpireSnapshots expireSnapshots()
Description copied from interface:TableCreate a newexpire APIto manage snapshots in this table and commit.- Specified by:
expireSnapshotsin interfaceTable- Returns:
- a new
ExpireSnapshots
-
rollback
public Rollback rollback()
Description copied from interface:TableCreate a newrollback APIto roll back to a previous snapshot and commit.
-
manageSnapshots
public ManageSnapshots manageSnapshots()
Description copied from interface:TableCreate a newmanage snapshots APIto manage snapshots in this table and commit.- Specified by:
manageSnapshotsin interfaceTable- Returns:
- a new
ManageSnapshots
-
newTransaction
public Transaction newTransaction()
Description copied from interface:TableCreate a newtransaction APIto commit multiple table operations at once.- Specified by:
newTransactionin interfaceTable- Returns:
- a new
Transaction
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-