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
ConstructorsConstructorDescriptionIcebergModify(MetadataTypeValidator metadataTypeValidator, IcebergMetastoreContext<T> context) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds delete operation to the list of pending operations.protected voidaddOverwrite(List<T> units) Adds overwrite operation to the list of pending operations.voidexecute()Executes list of provided metastore operations in one transaction if Metastore implementation supports transactions, otherwise executes operations consecutively.voidpurge()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:ModifyExecutes 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:ModifyDeletes 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:AbstractModifyAdds overwrite operation to the list of pending operations. Is used to ensure operations execution order.- Specified by:
addOverwritein classAbstractModify<T>- Parameters:
units- list of Metastore metadata units
-
addDelete
Description copied from class:AbstractModifyAdds delete operation to the list of pending operations. Is used to ensure operations execution order.- Specified by:
addDeletein classAbstractModify<T>- Parameters:
delete- Metastore delete operation holder
-