public class HiveTableOperations extends BaseMetastoreTableOperations
ICEBERG_TABLE_TYPE_VALUE, METADATA_LOCATION_PROP, PREVIOUS_METADATA_LOCATION_PROP, TABLE_TYPE_PROP
Modifier | Constructor and Description |
---|---|
protected |
HiveTableOperations(org.apache.hadoop.conf.Configuration conf,
org.apache.iceberg.hive.HiveClientPool metaClients,
java.lang.String database,
java.lang.String table) |
Modifier and Type | Method and Description |
---|---|
void |
commit(TableMetadata base,
TableMetadata metadata)
Replace the base table metadata with a new version.
|
TableMetadata |
refresh()
Return the current table metadata after checking for updates.
|
current, currentMetadataLocation, currentVersion, io, locationProvider, metadataFileLocation, refreshFromMetadataLocation, refreshFromMetadataLocation, requestRefresh, writeNewMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encryption, newSnapshotId
protected HiveTableOperations(org.apache.hadoop.conf.Configuration conf, org.apache.iceberg.hive.HiveClientPool metaClients, java.lang.String database, java.lang.String table)
public TableMetadata refresh()
TableOperations
public void commit(TableMetadata base, TableMetadata metadata)
TableOperations
This method should implement and document atomicity guarantees.
Implementations must check that the base metadata is current to avoid overwriting updates. Once the atomic commit operation succeeds, implementations must not perform any operations that may fail because failure in this method cannot be distinguished from commit failure.
base
- table metadata on which changes were basedmetadata
- new table metadata with updates