[ 
https://issues.apache.org/jira/browse/HADOOP-18708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896318#comment-17896318
 ] 

ASF GitHub Bot commented on HADOOP-18708:
-----------------------------------------

shameersss1 commented on code in PR #6884:
URL: https://github.com/apache/hadoop/pull/6884#discussion_r1832695442


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ErrorTranslation.java:
##########
@@ -105,6 +112,54 @@ private static Throwable getInnermostThrowable(Throwable 
thrown, Throwable outer
     return getInnermostThrowable(thrown.getCause(), thrown);
   }
 
+  /**
+   * Attempts to extract the underlying SdkException from an S3 encryption 
client exception.
+   *
+   * <p>This method is designed to handle exceptions that may be wrapped within
+   * S3EncryptionClientExceptions. It performs the following steps:
+   * <ol>
+   *   <li>Checks if the input exception is null.</li>
+   *   <li>Verifies if the exception contains the S3EncryptionClientException 
signature.</li>
+   *   <li>Examines the cause chain to find the most relevant 
SdkException.</li>
+   * </ol>
+   *
+   * <p>The method aims to unwrap nested exceptions to provide more meaningful
+   * error information, particularly in the context of S3 encryption 
operations.
+   *
+   * @param exception The SdkException to analyze. This may be a wrapper 
exception
+   *                  containing a more specific underlying cause.
+   * @return The extracted SdkException if found within the exception chain,
+   *         or the original exception if no relevant nested exception is 
found.
+   *         Returns null if the input exception is null.
+   *
+   * @see SdkException
+   * @see AwsServiceException
+   */
+  public static SdkException 
maybeExtractSdkExceptionFromEncryptionClientException(

Review Comment:
   ack.





> AWS SDK V2 - Implement CSE
> --------------------------
>
>                 Key: HADOOP-18708
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18708
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.4.0
>            Reporter: Ahmar Suhail
>            Assignee: Syed Shameerur Rahman
>            Priority: Major
>              Labels: pull-request-available
>
> S3 Encryption client for SDK V2 is now available, so add client side 
> encryption back in. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to