Class BaseViewOperations
- All Implemented Interfaces:
- ViewOperations
- Direct Known Subclasses:
- JdbcViewOperations,- NessieViewOperations
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.iceberg.BaseMetastoreOperationsBaseMetastoreOperations.CommitStatus
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcommit(ViewMetadata base, ViewMetadata metadata) Replace the base view metadata with a new version.current()Return the currently loaded view metadata, without checking for updates.protected Stringprotected intprotected voidprotected abstract voiddoCommit(ViewMetadata base, ViewMetadata metadata) protected abstract voidprotected abstract FileIOio()refresh()Return the current view metadata after checking for updates.protected voidrefreshFromMetadataLocation(String newLocation) protected voidrefreshFromMetadataLocation(String newLocation, Predicate<Exception> shouldRetry, int numRetries) protected voidrefreshFromMetadataLocation(String newLocation, Predicate<Exception> shouldRetry, int numRetries, Function<String, ViewMetadata> metadataLoader) protected voidprotected abstract StringviewName()protected StringwriteNewMetadataIfRequired(ViewMetadata metadata) Methods inherited from class org.apache.iceberg.BaseMetastoreOperationscheckCommitStatus, checkCommitStatusStrict
- 
Constructor Details- 
BaseViewOperationsprotected BaseViewOperations()
 
- 
- 
Method Details- 
requestRefreshprotected void requestRefresh()
- 
disableRefreshprotected void disableRefresh()
- 
doRefreshprotected abstract void doRefresh()
- 
doCommit
- 
viewName
- 
io
- 
currentMetadataLocation
- 
currentVersionprotected int currentVersion()
- 
currentDescription copied from interface:ViewOperationsReturn the currently loaded view metadata, without checking for updates.- Specified by:
- currentin interface- ViewOperations
- Returns:
- view metadata
 
- 
refreshDescription copied from interface:ViewOperationsReturn the current view metadata after checking for updates.- Specified by:
- refreshin interface- ViewOperations
- Returns:
- view metadata
 
- 
commitDescription copied from interface:ViewOperationsReplace the base view metadata with a new version.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. Implementations should throw a CommitStateUnknownExceptionin cases where it cannot be determined if the commit succeeded or failed. For example if a network partition causes the confirmation of the commit to be lost, the implementation should throw a CommitStateUnknownException. An unknown state indicates to downstream users of this API that it is not safe to perform clean up and remove any files. In general, strict metadata cleanup will only trigger cleanups when the commit fails with an exception implementing the marker interfaceCleanableFailure. All other exceptions will be treated as if the commit has failed.- Specified by:
- commitin interface- ViewOperations
- Parameters:
- base- view metadata on which changes were based
- metadata- new view metadata with updates
 
- 
writeNewMetadataIfRequired
- 
refreshFromMetadataLocation
- 
refreshFromMetadataLocation
- 
refreshFromMetadataLocation
 
-