[
https://issues.apache.org/jira/browse/FLINK-34023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874371#comment-17874371
]
Brad Atcheson commented on FLINK-34023:
---------------------------------------
Ah, thank you! Unit tests pass under Java 11 but not under 22.
Before:
```
$ mvn -v
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /opt/homebrew/Cellar/maven/3.9.8/libexec
Java version: 22.0.2, vendor: Homebrew, runtime:
/opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"
$ mvn clean package
...
[ERROR] Tests run: 6, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.01 s
<<< FAILURE! - in org.apache.flink.connector.aws.util.AWSClientUtilTest
[ERROR]
org.apache.flink.connector.aws.util.AWSClientUtilTest.testCreateKinesisAsyncClientWithEndpointOverride
Time elapsed: 0.053 s <<< ERROR!
org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: class
org.apache.flink.connector.aws.util.AWSClientUtilTest$MockAsyncClientBuilder.
Most likely it is a private class that is not visible by Mockito
You are seeing this disclaimer because Mockito is configured to create inlined
mocks.
You can learn about inline mocks and their limitations under item #39 of the
Mockito class javadoc.
...
```
After:
```
$ export JAVA_HOME=$(/usr/libexec/java_home)
$ mvn -v
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /opt/homebrew/Cellar/maven/3.9.8/libexec
Java version: 11.0.24, vendor: Homebrew, runtime:
/opt/homebrew/Cellar/openjdk@11/11.0.24/libexec/openjdk.jdk/Contents/Home
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"
$ mvn clean package
...
[INFO] BUILD SUCCESS
```
Yes, I will rebase (to add the config to the new SQS sink too) and create a PR
> Expose Kinesis client retry config in sink
> ------------------------------------------
>
> Key: FLINK-34023
> URL: https://issues.apache.org/jira/browse/FLINK-34023
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Kinesis
> Reporter: Brad Atcheson
> Priority: Major
>
> The consumer side exposes client retry configuration like
> [flink.shard.getrecords.maxretries|https://nightlies.apache.org/flink/flink-docs-stable/api/java/org/apache/flink/streaming/connectors/kinesis/config/ConsumerConfigConstants.html#SHARD_GETRECORDS_RETRIES]
> but the producer side lacks similar config for PutRecords.
> The KinesisStreamsSinkWriter constructor calls
> {code}
> this.httpClient =
> AWSGeneralUtil.createAsyncHttpClient(kinesisClientProperties);
> this.kinesisClient = buildClient(kinesisClientProperties, this.httpClient);
> {code}
> But those methods only refer to these values (aside from
> endpoint/region/creds) in the kinesisClientProperties:
> * aws.http-client.max-concurrency
> * aws.http-client.read-timeout
> * aws.trust.all.certificates
> * aws.http.protocol.version
> Without control over retry, users can observe exceptions like {code}Request
> attempt 2 failure: Unable to execute HTTP request: connection timed out after
> 2000 ms: kinesis.us-west-2.amazonaws.com{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)