Add overridable clean up step after dropping a dataverse
Change-Id: Ic0e4997f22e3c24dc0a3fafe5a44ef8a960a6dff
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/16943
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Hussain Towaileb <hussainht@gmail.com>
Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index 41d9282..1729b50 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -2035,6 +2035,8 @@
if (activeDataverse.getDataverseName().equals(dataverseName)) {
activeDataverse = MetadataBuiltinEntities.DEFAULT_DATAVERSE;
}
+
+ validateDataverseDatasetsStateAfterDrop(metadataProvider, mdTxnCtx, datasets);
MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
return true;
} catch (Exception e) {
@@ -2081,7 +2083,12 @@
protected void validateDataverseStateBeforeDrop(MetadataProvider metadataProvider, Dataverse dataverse,
SourceLocation sourceLoc) throws AlgebricksException {
- // may be overriden by product extensions for additional checks before dropping the dataverse
+ // may be overridden by product extensions for additional checks before dropping the dataverse
+ }
+
+ protected void validateDataverseDatasetsStateAfterDrop(MetadataProvider metadataProvider,
+ MetadataTransactionContext mdTxnCtx, List<Dataset> datasets) throws AlgebricksException {
+ // may be overridden by product extensions for additional checks after dropping the dataverse
}
public void handleDatasetDropStatement(MetadataProvider metadataProvider, Statement stmt,