Merge pull request #650 from ychunxue/master

Prepare for KCL release 2.2.6
This commit is contained in:
ychunxue 2019-11-07 17:18:13 -08:00 committed by GitHub
commit 80f5f68765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 24 deletions

View file

@ -1,5 +1,20 @@
# Changelog
### Release 2.2.6 (November 7, 2019)
[Milestone#43](https://github.com/awslabs/amazon-kinesis-client/milestone/43)
* Updating the SDK version to 2.9.25.
* [PR#638](https://github.com/awslabs/amazon-kinesis-client/pull/638)
* Clearing the local cache on a subscription termination, to avoid noisy logs on new subscriptions.
* [PR#642](https://github.com/awslabs/amazon-kinesis-client/pull/642)
* Updating the SDK version to 2.10.0 in order to fix the premature H2 stream close issue.
* [PR#649](https://github.com/awslabs/amazon-kinesis-client/pull/649)
* NOTE: SDK has a known connection teardown issue when multiple H2 streams are used within a connection. This might result in shard consumers sticking to a stale service host and not progressing. If your shard consumer gets stuck, use the following configuration as a workaround. This configuration might result in up to 5X increase in total connections.
```
KinesisAsyncClient kinesisClient = KinesisAsyncClient.builder()
.region(region)
.httpClientBuilder(NettyNioAsyncHttpClient.builder().maxConcurrency(Integer.MAX_VALUE).maxHttp2Streams(1))
.build()
```
### Release 2.2.5 (October 23, 2019)

View file

@ -60,14 +60,30 @@ The recommended way to use the KCL for Java is to consume it from Maven.
## Release Notes
### Latest Release (2.2.5 - October 23, 2019)
### Latest Release (2.2.6 - November 7, 2019)
[Milestone#43](https://github.com/awslabs/amazon-kinesis-client/milestone/43)
* Updating the SDK version to 2.9.25.
* [PR#638](https://github.com/awslabs/amazon-kinesis-client/pull/638)
* Clearing the local cache on a subscription termination, to avoid noisy logs on new subscriptions.
* [PR#642](https://github.com/awslabs/amazon-kinesis-client/pull/642)
* Updating the SDK version to 2.10.0 in order to fix the premature H2 stream close issue.
* [PR#649](https://github.com/awslabs/amazon-kinesis-client/pull/649)
* NOTE: SDK has a known connection teardown issue when multiple H2 streams are used within a connection. This might result in shard consumers sticking to a stale service host and not progressing. If your shard consumer gets stuck, use the following configuration as a workaround. This configuration might result in up to 5X increase in total connections.
```
KinesisAsyncClient kinesisClient = KinesisAsyncClient.builder()
.region(region)
.httpClientBuilder(NettyNioAsyncHttpClient.builder().maxConcurrency(Integer.MAX_VALUE).maxHttp2Streams(1))
.build()
```
### Related Prior Release (2.2.5 - October 23, 2019)
[Milestone#40](https://github.com/awslabs/amazon-kinesis-client/milestone/40)
* Updating Sonatype to dedicated AWS endpoint.
* [PR#619](https://github.com/awslabs/amazon-kinesis-client/pull/619)
* Introducing a validation step to verify if ShardEnd is reached, to prevent shard consumer stuck scenarios in the event of malformed response from service.
* [PR#624](https://github.com/awslabs/amazon-kinesis-client/pull/624)
### Latest Release (2.2.4 - September 23, 2019)
### Related Prior Release (2.2.4 - September 23, 2019)
[Milestone#39](https://github.com/awslabs/amazon-kinesis-client/milestone/39)
* Making FanoutRecordsPublisher test cases resilient to delayed thread operations
* [PR#612](https://github.com/awslabs/amazon-kinesis-client/pull/612)

View file

@ -21,7 +21,7 @@
<parent>
<artifactId>amazon-kinesis-client-pom</artifactId>
<groupId>software.amazon.kinesis</groupId>
<version>2.2.6-SNAPSHOT</version>
<version>2.2.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View file

@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.kinesis</groupId>
<artifactId>amazon-kinesis-client-pom</artifactId>
<version>2.2.6-SNAPSHOT</version>
<version>2.2.6</version>
</parent>
<artifactId>amazon-kinesis-client</artifactId>

View file

@ -34,7 +34,7 @@ public class RetrievalConfig {
*/
public static final String KINESIS_CLIENT_LIB_USER_AGENT = "amazon-kinesis-client-library-java";
public static final String KINESIS_CLIENT_LIB_USER_AGENT_VERSION = "2.2.6-SNAPSHOT";
public static final String KINESIS_CLIENT_LIB_USER_AGENT_VERSION = "2.2.6";
/**
* Client used to make calls to Kinesis for records retrieval

View file

@ -140,8 +140,7 @@ public class ShardConsumerSubscriberTest {
processedNotifier.wait(5000);
}
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
}
@Test
@ -176,8 +175,7 @@ public class ShardConsumerSubscriberTest {
assertThat(subscriber.getAndResetDispatchFailure(), equalTo(testException));
assertThat(subscriber.getAndResetDispatchFailure(), nullValue());
verify(shardConsumer, times(20)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(20)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
}
@ -202,8 +200,7 @@ public class ShardConsumerSubscriberTest {
Thread.sleep(10);
}
verify(shardConsumer, times(10)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(10)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
assertThat(subscriber.retrievalFailure(), equalTo(expected));
}
@ -239,8 +236,7 @@ public class ShardConsumerSubscriberTest {
}
assertThat(recordsPublisher.restartedFrom, equalTo(edgeRecord));
verify(shardConsumer, times(20)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(20)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
}
@Test
@ -304,8 +300,7 @@ public class ShardConsumerSubscriberTest {
processedNotifier.wait(5000);
}
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
assertThat(received.size(), equalTo(recordsPublisher.responses.size()));
Stream.iterate(0, i -> i + 1).limit(received.size()).forEach(i -> assertThat(received.get(i),
@ -344,8 +339,7 @@ public class ShardConsumerSubscriberTest {
// Verifying that there are no interactions with shardConsumer mock indicating no records were sent back and
// subscription has not started correctly.
verify(shardConsumer, never()).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, never()).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
Stream.iterate(2, i -> i + 1).limit(98).forEach(this::addUniqueItem);
@ -361,8 +355,7 @@ public class ShardConsumerSubscriberTest {
}
// Verify that shardConsumer mock was called 100 times and all 100 input records are processed.
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(100)).handleInput(any(ProcessRecordsInput.class), any(Subscription.class));
// Verify that received records in the subscriber are equal to the ones sent by the record publisher.
assertThat(received.size(), equalTo(recordsPublisher.responses.size()));
@ -406,8 +399,7 @@ public class ShardConsumerSubscriberTest {
// Verifying that there are no interactions with shardConsumer mock indicating no records were sent back and
// subscription has not started correctly.
verify(shardConsumer, never()).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, never()).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
Stream.iterate(2, i -> i + 1).limit(98).forEach(this::addUniqueItem);
@ -423,8 +415,7 @@ public class ShardConsumerSubscriberTest {
}
// Verify that shardConsumer mock was called 100 times and all 100 input records are processed.
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)),
any(Subscription.class));
verify(shardConsumer, times(100)).handleInput(argThat(eqProcessRecordsInput(processRecordsInput)), any(Subscription.class));
// Verify that received records in the subscriber are equal to the ones sent by the record publisher.
assertThat(received.size(), equalTo(recordsPublisher.responses.size()));

View file

@ -22,7 +22,7 @@
<artifactId>amazon-kinesis-client-pom</artifactId>
<packaging>pom</packaging>
<name>Amazon Kinesis Client Library</name>
<version>2.2.6-SNAPSHOT</version>
<version>2.2.6</version>
<description>The Amazon Kinesis Client Library for Java enables Java developers to easily consume and process data
from Amazon Kinesis.
</description>