Class AWSExceptionClassifierUtil
- java.lang.Object
-
- org.apache.flink.connector.aws.sink.throwable.AWSExceptionClassifierUtil
-
@Internal public class AWSExceptionClassifierUtil extends Object
Util class to createFatalExceptionClassifierto classifyAwsServiceExceptionbased onAwsErrorDetails.errorCode().
-
-
Constructor Summary
Constructors Constructor Description AWSExceptionClassifierUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.flink.connector.base.sink.throwable.FatalExceptionClassifierwithAWSServiceErrorCode(Class<? extends software.amazon.awssdk.awscore.exception.AwsServiceException> serviceExceptionType, String errorCode, java.util.function.Function<Throwable,Exception> mapper)Creates aFatalExceptionClassifierthat classifies an exception as fatal if a given exception contains anAwsServiceExceptionof type serviceExceptionType andAwsErrorDetails.errorCode()errorCode.
-
-
-
Method Detail
-
withAWSServiceErrorCode
public static org.apache.flink.connector.base.sink.throwable.FatalExceptionClassifier withAWSServiceErrorCode(Class<? extends software.amazon.awssdk.awscore.exception.AwsServiceException> serviceExceptionType, String errorCode, java.util.function.Function<Throwable,Exception> mapper)
Creates aFatalExceptionClassifierthat classifies an exception as fatal if a given exception contains anAwsServiceExceptionof type serviceExceptionType andAwsErrorDetails.errorCode()errorCode.- Parameters:
serviceExceptionType- The specificAwsServiceExceptionto look for in the exception.errorCode- TheAwsErrorDetails.errorCode()for the passed serviceExceptionType.mapper- The exception mapper to be used by the returnedAWSExceptionHandler.- Returns:
- A
FatalExceptionClassifierclassifying based on exception type and error code.
-
-