Class RdbmsModify<T>

java.lang.Object
org.apache.drill.metastore.operate.AbstractModify<T>
org.apache.drill.metastore.rdbms.operate.RdbmsModify<T>
Type Parameters:
T - Metastore component unit type
All Implemented Interfaces:
Modify<T>

public class RdbmsModify<T> extends AbstractModify<T>
Implementation of Modify interface based on AbstractModify parent class. Modifies information in RDBMS tables based on given overwrite or delete operations. Executes given operations in one transaction.
  • Constructor Details

  • 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

      protected void addOverwrite(List<T> units)
      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 class AbstractModify<T>
      Parameters:
      units - list of Metastore metadata units
    • addDelete

      protected void addDelete(Delete delete)
      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 class AbstractModify<T>
      Parameters:
      delete - Metastore delete operation holder