File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 23
23
24
24
import software .amazon .awssdk .awscore .exception .AwsServiceException ;
25
25
import software .amazon .awssdk .core .exception .SdkException ;
26
- import software .amazon .encryption .s3 .S3EncryptionClientException ;
27
26
28
27
import org .apache .hadoop .classification .VisibleForTesting ;
29
28
import org .apache .hadoop .fs .s3a .HttpChannelEOFException ;
@@ -71,6 +70,9 @@ public final class ErrorTranslation {
71
70
private ErrorTranslation () {
72
71
}
73
72
73
+ static final String ENCRYPTION_CLIENT_EXCEPTION =
74
+ "software.amazon.encryption.s3.S3EncryptionClientException" ;
75
+
74
76
/**
75
77
* Does this exception indicate that the AWS Bucket was unknown.
76
78
* @param e exception.
@@ -161,7 +163,7 @@ public static IOException maybeExtractIOException(
161
163
*/
162
164
public static SdkException maybeExtractSdkException (SdkException exception ) {
163
165
SdkException extractedException = exception ;
164
- if (exception instanceof S3EncryptionClientException
166
+ if (exception . toString (). contains ( ENCRYPTION_CLIENT_EXCEPTION )
165
167
&& exception .getCause () instanceof SdkException ) {
166
168
extractedException = (SdkException ) exception .getCause ();
167
169
if (extractedException != null
You can’t perform that action at this time.
0 commit comments