steveloughran commented on code in PR #6164:
URL: https://github.com/apache/hadoop/pull/6164#discussion_r1503019354
##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ErrorTranslation.java:
##########
@@ -152,6 +156,25 @@ public static IOException maybeExtractIOException(
return wrapWithInnerIOE(path, message, thrown, ioe);
}
+ /**
+ * Extracts the underlying exception from a SdkException.
+ * @param exception amazon exception raised
+ * @return extractedException
+ */
+ public static SdkException maybeExtractSdkException(SdkException exception) {
Review Comment:
how about "maybeExtractInnerSdkException()"
##########
hadoop-project/pom.xml:
##########
@@ -1149,6 +1150,17 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>software.amazon.encryption.s3</groupId>
Review Comment:
is this going to get into bundle.jar?
##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ErrorTranslation.java:
##########
@@ -152,6 +156,25 @@ public static IOException maybeExtractIOException(
return wrapWithInnerIOE(path, message, thrown, ioe);
}
+ /**
+ * Extracts the underlying exception from a SdkException.
+ * @param exception amazon exception raised
+ * @return extractedException
+ */
+ public static SdkException maybeExtractSdkException(SdkException exception) {
+ SdkException extractedException = exception;
+ if (exception.toString().contains(ENCRYPTION_CLIENT_EXCEPTION)
+ && exception.getCause() instanceof SdkException) {
Review Comment:
lets put this at the top and return null immediately; lines up for adding
more probes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]