asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [ASTERIXDB-2029][COMP]Remove "this" from dataset errors
Date Wed, 09 Aug 2017 06:16:11 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: [ASTERIXDB-2029][COMP]Remove "this" from dataset errors
......................................................................


[ASTERIXDB-2029][COMP]Remove "this" from dataset errors

- user model changes: improves error message
- storage format changes: no
- interface changes: no

details:
- Error message for drop dataset operation had the word "this"
  as part of the error message. It was removed

Change-Id: Ifc74edb44aef8bfac3cb73fb8192bf6c353a66de
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1928
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
Integration-Tests: abdullah alamoudi <bamousaa@gmail.com>
Tested-by: abdullah alamoudi <bamousaa@gmail.com>
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
3 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  abdullah alamoudi: Looks good to me, approved; Verified; Verified



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 28cb998..027fbbe 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
@@ -1162,8 +1162,8 @@
                 }
             }
             // # check whether any function in current dataverse is being used by others
-            List<Function> functionsInDataverse = MetadataManager.INSTANCE.getDataverseFunctions(mdTxnCtx,
-                    dataverseName);
+            List<Function> functionsInDataverse =
+                    MetadataManager.INSTANCE.getDataverseFunctions(mdTxnCtx, dataverseName);
             for (Function function : functionsInDataverse) {
                 if (checkWhetherFunctionIsBeingUsed(mdTxnCtx, function.getDataverseName(),
function.getName(),
                         function.getArity(), dataverseName)) {
@@ -1331,8 +1331,7 @@
                     MetadataManager.INSTANCE.commitTransaction(mdTxnCtx.getValue());
                     return;
                 } else {
-                    throw new AlgebricksException("There is no dataset with this name " +
datasetName + " in dataverse "
-                            + dataverseName + ".");
+                    throw new AsterixException(ErrorCode.NO_DATASET_WITH_NAME, dataverseName,
datasetName);
                 }
             }
             ds.drop(metadataProvider, mdTxnCtx, jobsToExecute, bActiveTxn, progress, hcc,
dropCorrespondingNodeGroup);
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
index 5aed5f2..143f7d1 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
@@ -121,6 +121,7 @@
     public static final int UPGRADE_FAILED_LOCK_WAS_NOT_ACQUIRED = 1047;
     public static final int DOWNGRADE_FAILED_LOCK_WAS_NOT_ACQUIRED = 1048;
     public static final int LOCK_WAS_ACQUIRED_DIFFERENT_OPERATION = 1049;
+    public static final int NO_DATASET_WITH_NAME = 1050;
 
     // Feed errors
     public static final int DATAFLOW_ILLEGAL_STATE = 3001;
diff --git a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
index a7a1990..715c27d 100644
--- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
+++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
@@ -107,6 +107,7 @@
 1047 = Metadata lock cannot be upgraded! because it was not acquired before
 1048 = Metadata lock cannot be downgraded! because it was not acquired before
 1049 = Metadata lock cannot be acquired for %1$s since it is already acquired for %2$s
+1050 = There is no dataset with name %2$s in dataverse %1$s
 
 # Feed Errors
 3001 = Illegal state.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1928
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc74edb44aef8bfac3cb73fb8192bf6c353a66de
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mblow@apache.org>
Gerrit-Reviewer: Murtadha Hubail <mhubail@apache.org>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message