john-karp commented on a change in pull request #17785:
URL: https://github.com/apache/flink/pull/17785#discussion_r755382254



##########
File path: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java
##########
@@ -420,6 +421,8 @@ private String getShardIterator(GetShardIteratorRequest 
getShardIteratorRequest)
     protected boolean isRecoverableSdkClientException(SdkClientException ex) {
         if (ex instanceof AmazonServiceException) {
             return 
KinesisProxy.isRecoverableException((AmazonServiceException) ex);
+        } else if (ex.getCause() instanceof ConnectTimeoutException) {

Review comment:
       How about having the test be`ExceptionUtils.findThrowable(ex, 
ConnectException.class).isPresent()`? Using `java.net.ConnectException` has the 
advantage that it is independent of the HTTP library used by the AWS SDK. (The 
`ExceptionUtils` here is from `org.apache.flink.util`).
   
   Or, using `ExceptionUtils` from `org.apache.commons.lang3`, the test could 
be `ExceptionUtils.getRootCause(ex) instanceof ConnectException`.




-- 
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]


Reply via email to