Class IcebergModify<T>
java.lang.Object
org.apache.drill.metastore.operate.AbstractModify<T>
org.apache.drill.metastore.iceberg.operate.IcebergModify<T>
- Type Parameters:
T
- Metastore component unit type
- All Implemented Interfaces:
Modify<T>
Implementation of
Modify
interface based on AbstractModify
parent class.
Modifies information in Iceberg table based on given overwrite or delete operations.
Executes given operations in one transaction.-
Constructor Summary
ConstructorDescriptionIcebergModify
(MetadataTypeValidator metadataTypeValidator, IcebergMetastoreContext<T> context) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds delete operation to the list of pending operations.protected void
addOverwrite
(List<T> units) Adds overwrite operation to the list of pending operations.void
execute()
Executes list of provided metastore operations in one transaction if Metastore implementation supports transactions, otherwise executes operations consecutively.void
purge()
Deletes all data from the Metastore component.Methods inherited from class org.apache.drill.metastore.operate.AbstractModify
delete, overwrite
-
Constructor Details
-
IcebergModify
public IcebergModify(MetadataTypeValidator metadataTypeValidator, IcebergMetastoreContext<T> context)
-
-
Method Details
-
execute
public void execute()Description copied from interface:Modify
Executes list of provided metastore operations in one transaction if Metastore implementation supports transactions, otherwise executes operations consecutively. All operations should be executed in the same order as they were added. -
purge
public void purge()Description copied from interface:Modify
Deletes all data from the Metastore component. Note, this is terminal operation and it does not take into account any previously set delete operations or overwrite units, it just deletes all data. -
addOverwrite
Description copied from class:AbstractModify
Adds overwrite operation to the list of pending operations. Is used to ensure operations execution order.- Specified by:
addOverwrite
in classAbstractModify<T>
- Parameters:
units
- list of Metastore metadata units
-
addDelete
Description copied from class:AbstractModify
Adds delete operation to the list of pending operations. Is used to ensure operations execution order.- Specified by:
addDelete
in classAbstractModify<T>
- Parameters:
delete
- Metastore delete operation holder
-