xiaolong-sn commented on a change in pull request #13005:
URL: https://github.com/apache/flink/pull/13005#discussion_r463384576
##########
File path:
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AwsV2Util.java
##########
@@ -248,4 +254,29 @@ static AwsCredentialsProvider
getWebIdentityTokenFileCredentialsProvider(
public static Region getRegion(final Properties configProps) {
return
Region.of(configProps.getProperty(AWSConfigConstants.AWS_REGION));
}
+
+ /**
+ * Whether or not an exception is recoverable.
+ */
+ public static boolean isRecoverableException(ExecutionException e) {
+ if (!(e.getCause() instanceof SdkException)) {
+ return false;
+ }
+ SdkException ase = (SdkException) e.getCause();
+ return ase instanceof LimitExceededException || ase instanceof
ProvisionedThroughputExceededException || ase instanceof ResourceInUseException;
Review comment:
I re-read the code and found out that the ResourceInUseExeption might
not be a recoverable exception and removed it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]