Package org.apache.iceberg.view
Interface ViewOperations
-
- All Known Implementing Classes:
BaseMetastoreViewOperations,HadoopViewOperations,NessieViewOperations
public interface ViewOperationsSPI interface to abstract view metadata access and updates.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcommit(ViewVersionMetadata base, ViewVersionMetadata metadata, java.util.Map<java.lang.String,java.lang.String> properties)Replace the base metadata with a new version.ViewVersionMetadatacurrent()Return the currently loaded view metadata, without checking for updates.voiddrop(java.lang.String viewIdentifier)Drops the view specified by the 'viewIdentifier' parameter.default java.util.Map<java.lang.String,java.lang.String>extraProperties()Return extra properties not stored inViewVersionMetadata.org.apache.iceberg.io.FileIOio()AFileIOto read and write table data and metadata files.ViewVersionMetadatarefresh()Return the current view metadata after checking for updates.
-
-
-
Method Detail
-
current
ViewVersionMetadata current()
Return the currently loaded view metadata, without checking for updates.- Returns:
- view version metadata
-
extraProperties
default java.util.Map<java.lang.String,java.lang.String> extraProperties()
Return extra properties not stored inViewVersionMetadata.- Returns:
- a map of properties
-
refresh
ViewVersionMetadata refresh()
Return the current view metadata after checking for updates.- Returns:
- view version metadata
-
drop
void drop(java.lang.String viewIdentifier)
Drops the view specified by the 'viewIdentifier' parameter. Used only by the test infrastructure such as HadoopViewOperations and TestViews. Metacat views are dropped using direct hive 'drop' object calls.- Parameters:
viewIdentifier- specifies the name/location of the view.
-
commit
void commit(ViewVersionMetadata base, ViewVersionMetadata metadata, java.util.Map<java.lang.String,java.lang.String> properties)
Replace the base 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.
- Parameters:
base- view metadata on which changes were basedmetadata- new view metadata with updatesproperties- Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
-
io
org.apache.iceberg.io.FileIO io()
AFileIOto read and write table data and metadata files.- Returns:
- a
FileIOto read and write table data and metadata files
-
-