Class IcebergCatalog.BasePolarisTableOperations
java.lang.Object
org.apache.polaris.service.catalog.iceberg.IcebergCatalog.BasePolarisTableOperations
- All Implemented Interfaces:
org.apache.iceberg.TableOperations
- Enclosing class:
IcebergCatalog
public class IcebergCatalog.BasePolarisTableOperations
extends Object
implements org.apache.iceberg.TableOperations
An implementation of
TableOperations that integrates with IcebergCatalog. Much
of this code was originally copied from BaseMetastoreTableOperations. CODE_COPIED_TO_POLARIS From Apache Iceberg
Version: 1.8-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) org.apache.iceberg.TableMetadatacurrent()protected voidvoiddoCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) voidorg.apache.iceberg.io.FileIOio()org.apache.iceberg.io.LocationProvidermetadataFileLocation(String filename) protected intparseVersion(String metadataLocation) Parse the version from table/view metadata file name.org.apache.iceberg.TableMetadatarefresh()protected voidrefreshFromMetadataLocation(String newLocation, Predicate<Exception> shouldRetry, int numRetries, Function<String, org.apache.iceberg.TableMetadata> metadataLoader) protected voidorg.apache.iceberg.TableOperationstemp(org.apache.iceberg.TableMetadata uncommittedMetadata) protected StringwriteNewMetadata(org.apache.iceberg.TableMetadata metadata, int newVersion) protected StringwriteNewMetadataIfRequired(boolean newTable, org.apache.iceberg.TableMetadata metadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.TableOperations
encryption, newSnapshotId, requireStrictCleanup
-
Field Details
-
METADATA_FOLDER_NAME
- See Also:
-
currentMetadata
protected org.apache.iceberg.TableMetadata currentMetadata -
currentMetadataLocation
-
shouldRefresh
protected boolean shouldRefresh -
version
protected int version
-
-
Method Details
-
current
public org.apache.iceberg.TableMetadata current()- Specified by:
currentin interfaceorg.apache.iceberg.TableOperations
-
refresh
public org.apache.iceberg.TableMetadata refresh()- Specified by:
refreshin interfaceorg.apache.iceberg.TableOperations
-
commit
public void commit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) - Specified by:
commitin interfaceorg.apache.iceberg.TableOperations
-
io
public org.apache.iceberg.io.FileIO io()- Specified by:
ioin interfaceorg.apache.iceberg.TableOperations
-
metadataFileLocation
- Specified by:
metadataFileLocationin interfaceorg.apache.iceberg.TableOperations
-
locationProvider
public org.apache.iceberg.io.LocationProvider locationProvider()- Specified by:
locationProviderin interfaceorg.apache.iceberg.TableOperations
-
doRefresh
public void doRefresh() -
doCommit
public void doCommit(org.apache.iceberg.TableMetadata base, org.apache.iceberg.TableMetadata metadata) -
temp
public org.apache.iceberg.TableOperations temp(org.apache.iceberg.TableMetadata uncommittedMetadata) - Specified by:
tempin interfaceorg.apache.iceberg.TableOperations
-
writeNewMetadataIfRequired
protected String writeNewMetadataIfRequired(boolean newTable, org.apache.iceberg.TableMetadata metadata) -
writeNewMetadata
-
requestRefresh
protected void requestRefresh() -
disableRefresh
protected void disableRefresh() -
parseVersion
Parse the version from table/view metadata file name.- Parameters:
metadataLocation- table/view metadata file location- Returns:
- version of the table/view metadata file in success case and -1 if the version is not parsable (as a sign that the metadata is not part of this catalog)
-
refreshFromMetadataLocation
-