>From Hussain Towaileb <[email protected]>:

Hussain Towaileb has submitted this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18211 )

Change subject: [NO ISSUE] Introduce External Sink Error for write to
......................................................................

[NO ISSUE] Introduce External Sink Error for write to

Change-Id: I6c34ca6cb3e5ef39a4c9f3c11cb55a748758e85b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18211
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Hussain Towaileb <[email protected]>
Reviewed-by: Wail Alkowaileet <[email protected]>
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
M 
asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java
M 
asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/AbstractCloudExternalFileWriter.java
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
4 files changed, 21 insertions(+), 5 deletions(-)

Approvals:
  Wail Alkowaileet: Looks good to me, approved
  Hussain Towaileb: Looks good to me, but someone else must approve
  Jenkins: Verified; Verified

Objections:
  Anon. E. Moose #1000171: Violations found




diff --git 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/AbstractCloudExternalFileWriter.java
 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/AbstractCloudExternalFileWriter.java
index e2c09eb..bbae29a 100644
--- 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/AbstractCloudExternalFileWriter.java
+++ 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/AbstractCloudExternalFileWriter.java
@@ -99,7 +99,7 @@
             throw e;
         } catch (Exception e) {
             if (isSdkException(e)) {
-                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SOURCE_ERROR, e, 
getMessageOrToString(e));
+                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SINK_ERROR, e, 
getMessageOrToString(e));
             }
             throw e;
         }
@@ -116,7 +116,7 @@
             throw e;
         } catch (Exception e) {
             if (isSdkException(e)) {
-                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SOURCE_ERROR, e, 
getMessageOrToString(e));
+                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SINK_ERROR, e, 
getMessageOrToString(e));
             }
             throw HyracksDataException.create(e);
         }
@@ -130,7 +130,7 @@
             throw e;
         } catch (Exception e) {
             if (isSdkException(e)) {
-                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SOURCE_ERROR, e, 
getMessageOrToString(e));
+                throw 
RuntimeDataException.create(ErrorCode.EXTERNAL_SINK_ERROR, e, 
getMessageOrToString(e));
             }
             throw HyracksDataException.create(e);
         }
diff --git 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java
 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java
index cb0a6e7..5faa8e1 100644
--- 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java
+++ 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java
@@ -129,11 +129,11 @@
             if (e.getCause() instanceof NoSuchBucketException) {
                 throw 
CompilationException.create(ErrorCode.EXTERNAL_SOURCE_CONTAINER_NOT_FOUND, 
bucket);
             } else {
-                throw 
CompilationException.create(ErrorCode.EXTERNAL_SOURCE_ERROR,
+                throw 
CompilationException.create(ErrorCode.EXTERNAL_SINK_ERROR,
                         ExceptionUtils.getMessageOrToString(e));
             }
         } catch (SdkException e) {
-            throw CompilationException.create(ErrorCode.EXTERNAL_SOURCE_ERROR, 
e, getMessageOrToString(e));
+            throw CompilationException.create(ErrorCode.EXTERNAL_SINK_ERROR, 
e, getMessageOrToString(e));
         }
     }

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 ab028de..8994fc3 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
@@ -298,6 +298,7 @@
     UNKNOWN_STORAGE_FORMAT(1193),
     UNSUPPORTED_INDEX_IN_COLUMNAR_FORMAT(1194),
     COMPOSITE_KEY_NOT_SUPPORTED(1195),
+    EXTERNAL_SINK_ERROR(1196),

     // Feed errors
     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 bc1b0d0..8d624d4 100644
--- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
+++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
@@ -300,6 +300,7 @@
 1193 = Unknown storage format '%1$s'
 1194 = Index type '%1$s' is not supported with columnar storage format
 1195 = Composite key is not allowed, only single key must be specified.
+1196 = External sink error. %1$s

 # Feed Errors
 3001 = Illegal state.

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18211
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I6c34ca6cb3e5ef39a4c9f3c11cb55a748758e85b
Gerrit-Change-Number: 18211
Gerrit-PatchSet: 2
Gerrit-Owner: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Wail Alkowaileet <[email protected]>
Gerrit-MessageType: merged

Reply via email to