Class AbstractModify<T>
java.lang.Object
org.apache.drill.metastore.operate.AbstractModify<T>
- Type Parameters:
T
- Metastore metadata unit
- All Implemented Interfaces:
Modify<T>
- Direct Known Subclasses:
IcebergModify
,MongoModify
,RdbmsModify
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractModify
(MetadataTypeValidator metadataTypeValidator) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Adds delete operation to the list of pending operations.protected abstract void
addOverwrite
(List<T> units) Adds overwrite operation to the list of pending operations.Adds delete operation for the Metastore component based on the filter expression and metadata types.Adds overwrite operation for the Metastore component.
-
Constructor Details
-
AbstractModify
-
-
Method Details
-
overwrite
Description copied from interface:Modify
Adds overwrite operation for the Metastore component. For Metastore Tables component, can be used to add new table data or replace partially / fully existing. For example, if one of the table segments has changed, all this segment data and table general information must be replaced with updated data. Thus provided units must include updated data, filter by which existing data will be overwritten will be determined based on given data. -
delete
Description copied from interface:Modify
Adds delete operation for the Metastore component based on the filter expression and metadata types. For example for Metastore Tables component, if table has two segments and data for one of the segments needs to be deleted. Thus filter must be based on unique identifier of the table's top-level segment: storagePlugin = 'dfs' and workspace = 'tmp' and tableName = 'nation' and metadataKey = 'part_int=3'. Metadata types should include all metadata types present in this segment: SEGMENT, FILE, ROW_GROUP, PARTITION. If all table metadata should be deleted, ALL segment can be indicated along with unique table identifier: storagePlugin = 'dfs' and workspace = 'tmp' and tableName = 'nation'. -
addOverwrite
Adds overwrite operation to the list of pending operations. Is used to ensure operations execution order.- Parameters:
units
- list of Metastore metadata units
-
addDelete
Adds delete operation to the list of pending operations. Is used to ensure operations execution order.- Parameters:
delete
- Metastore delete operation holder
-