use of org.apache.drill.metastore.rdbms.exception.RdbmsMetastoreException in project drill by apache.
the class RdbmsModify method executeOperations.
/**
* Executes list of provided RDBMS operations in one transaction.
*
* @param operations list of RDBMS operations
*/
private void executeOperations(List<RdbmsOperation> operations) {
try (DSLContext executor = context.executorProvider().executor()) {
executor.transaction(configuration -> {
DSLContext transactionalExecutor = DSL.using(configuration);
operations.forEach(operation -> operation.execute(transactionalExecutor));
});
} catch (RuntimeException e) {
throw new RdbmsMetastoreException("Error during Metastore modify operation execution: " + e.getMessage(), e);
}
}
Aggregations