This is an automated email from the ASF dual-hosted git repository.
htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 29cc82f8cd [NO ISSUE] Introduce External Sink Error for write to
29cc82f8cd is described below
commit 29cc82f8cdda9dd00f90b44dacc071b6f901d320
Author: Hussain Towaileb <[email protected]>
AuthorDate: Wed Mar 27 22:20:11 2024 +0300
[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]>
---
.../asterix/cloud/writer/AbstractCloudExternalFileWriter.java | 6 +++---
.../apache/asterix/cloud/writer/S3ExternalFileWriterFactory.java | 4 ++--
.../main/java/org/apache/asterix/common/exceptions/ErrorCode.java | 1 +
.../asterix-common/src/main/resources/asx_errormsg/en.properties | 1 +
4 files changed, 7 insertions(+), 5 deletions(-)
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 e2c09eb355..bbae29a974 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 @@ abstract class AbstractCloudExternalFileWriter implements
IExternalFileWriter {
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 @@ abstract class AbstractCloudExternalFileWriter implements
IExternalFileWriter {
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 @@ abstract class AbstractCloudExternalFileWriter implements
IExternalFileWriter {
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 cb0a6e7c1c..5faa8e16ee 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 @@ public final class S3ExternalFileWriterFactory implements
IExternalFileWriterFac
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 ab028de014..8994fc31db 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 @@ public enum ErrorCode implements IError {
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 bc1b0d0df0..8d624d4a6f 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.