Skip to content

Updated crt http client to use latest crt api, which uses byte[] for … #1498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
77fc5aa
Amazon Pinpoint Update: This release of the Amazon Pinpoint API intro…
Nov 1, 2019
84875f9
AWS Database Migration Service Update: This release contains task tim…
Nov 1, 2019
c089a5f
AWS CloudTrail Update: This release adds two new APIs, GetTrail and L…
Nov 1, 2019
51468b6
Release 2.10.7. Updated CHANGELOG.md, README.md and all pom.xml.
Nov 1, 2019
e8c5504
Merge pull request #657 from aws/staging/388a3a8b-bd1c-4999-82b9-975d…
aws-sdk-java-automation Nov 1, 2019
879d14c
Update to next snapshot version: 2.10.8-SNAPSHOT
Nov 1, 2019
be6229e
Amazon DynamoDB Accelerator (DAX) Update: Documentation updates for dax
Nov 4, 2019
f79e252
AWS RoboMaker Update: RoboMaker Fleet Management launch a feature to …
Nov 4, 2019
f8fd5cf
Amazon Elastic Compute Cloud Update: Documentation updates for ec2
Nov 4, 2019
68618ad
Release 2.10.8. Updated CHANGELOG.md, README.md and all pom.xml.
Nov 4, 2019
691ca79
Merge pull request #658 from aws/staging/d62065eb-2729-42ac-b74e-3da1…
aws-sdk-java-automation Nov 4, 2019
500a2d3
Update to next snapshot version: 2.10.9-SNAPSHOT
Nov 4, 2019
4122966
Updated crt http client to use latest crt api, which uses byte[] for …
JonathanHenson Nov 4, 2019
d4974d7
Removed old comment.
JonathanHenson Nov 4, 2019
39d9894
Merge branch 'master' into crt-api-update
JonathanHenson Nov 4, 2019
ec5a086
Fixed build failures.
JonathanHenson Nov 5, 2019
446cb74
Fixed benchmark builds.
JonathanHenson Nov 5, 2019
7713022
Removed unused import.
JonathanHenson Nov 5, 2019
f4c106b
Fixed SPI test.
JonathanHenson Nov 5, 2019
3757da1
Hopefully fix the build this time.
JonathanHenson Nov 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changes/2.10.7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.10.7",
"date": "2019-11-01",
"entries": [
{
"type": "feature",
"category": "Amazon Pinpoint",
"description": "This release of the Amazon Pinpoint API introduces support for using and managing journeys, and querying analytics data for journeys."
},
{
"type": "feature",
"category": "AWS CloudTrail",
"description": "This release adds two new APIs, GetTrail and ListTrails, and support for adding tags when you create a trail by using a new TagsList parameter on CreateTrail operations."
},
{
"type": "feature",
"category": "AWS Database Migration Service",
"description": "This release contains task timeline attributes in replication task statistics. This release also adds a note to the documentation for the CdcStartPosition task request parameter. This note describes how to enable the use of native CDC start points for a PostgreSQL source by setting the new slotName extra connection attribute on the source endpoint to the name of an existing logical replication slot."
}
]
}
21 changes: 21 additions & 0 deletions .changes/2.10.8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.10.8",
"date": "2019-11-04",
"entries": [
{
"type": "feature",
"category": "AWS RoboMaker",
"description": "RoboMaker Fleet Management launch a feature to verify your robot is ready to download and install the new robot application using a download condition file, which is a script run on the robot prior to downloading the new deployment."
},
{
"type": "feature",
"category": "Amazon DynamoDB Accelerator (DAX)",
"description": "Documentation updates for dax"
},
{
"type": "feature",
"category": "Amazon Elastic Compute Cloud",
"description": "Documentation updates for ec2"
}
]
}
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# __2.10.8__ __2019-11-04__
## __AWS RoboMaker__
- ### Features
- RoboMaker Fleet Management launch a feature to verify your robot is ready to download and install the new robot application using a download condition file, which is a script run on the robot prior to downloading the new deployment.

## __Amazon DynamoDB Accelerator (DAX)__
- ### Features
- Documentation updates for dax

## __Amazon Elastic Compute Cloud__
- ### Features
- Documentation updates for ec2

# __2.10.7__ __2019-11-01__
## __AWS CloudTrail__
- ### Features
- This release adds two new APIs, GetTrail and ListTrails, and support for adding tags when you create a trail by using a new TagsList parameter on CreateTrail operations.

## __AWS Database Migration Service__
- ### Features
- This release contains task timeline attributes in replication task statistics. This release also adds a note to the documentation for the CdcStartPosition task request parameter. This note describes how to enable the use of native CDC start points for a PostgreSQL source by setting the new slotName extra connection attribute on the source endpoint to the name of an existing logical replication slot.

## __Amazon Pinpoint__
- ### Features
- This release of the Amazon Pinpoint API introduces support for using and managing journeys, and querying analytics data for journeys.

# __2.10.6__ __2019-10-31__
## __AWS Amplify__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.10.6</version>
<version>2.10.8</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -82,12 +82,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.10.6</version>
<version>2.10.8</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.10.6</version>
<version>2.10.8</version>
</dependency>
```

Expand All @@ -99,7 +99,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.10.6</version>
<version>2.10.8</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
2 changes: 1 addition & 1 deletion core/annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/arns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>auth</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/aws-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>aws-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>profiles</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-cbor-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-ion-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-json-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-query-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-xml-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/protocol-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/regions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>regions</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/sdk-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<artifactId>sdk-core</artifactId>
<name>AWS Java SDK :: SDK Core</name>
Expand Down
2 changes: 1 addition & 1 deletion http-client-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<artifactId>http-client-spi</artifactId>
<name>AWS Java SDK :: HTTP Client Interface</name>
Expand Down
2 changes: 1 addition & 1 deletion http-clients/apache-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>http-clients</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>

<artifactId>apache-client</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions http-clients/aws-crt-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>http-clients</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.10.7-SNAPSHOT</version>
<version>2.10.9-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -33,7 +33,7 @@
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>0.3.35</version>
<version>0.4.1</version>
</dependency>

<!--SDK dependencies-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ private HttpClientConnectionManager createConnectionPool(URI uri) {
Validate.notNull(uri, "URI must not be null");
log.debug(() -> "Creating ConnectionPool for: URI:" + uri + ", MaxConns: " + maxConnectionsPerEndpoint);

return new HttpClientConnectionManager(bootstrap, socketOptions, tlsContext, uri,
HttpClientConnectionManager.DEFAULT_MAX_BUFFER_SIZE, windowSize,
return new HttpClientConnectionManager(bootstrap, socketOptions, tlsContext, uri, windowSize,
maxConnectionsPerEndpoint);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

package software.amazon.awssdk.http.crt.internal;

import static software.amazon.awssdk.crt.utils.ByteBufferUtils.deepCopy;

import java.nio.ByteBuffer;
import java.util.concurrent.CompletableFuture;
import software.amazon.awssdk.annotations.SdkInternalApi;
Expand Down Expand Up @@ -89,23 +87,17 @@ public void onResponseHeadersDone(HttpStream stream, int headerType) {
}

@Override
public int onResponseBody(HttpStream stream, ByteBuffer bodyBytesIn) {
public int onResponseBody(HttpStream stream, byte[] bodyBytesIn) {
initRespBodyPublisherIfNeeded(stream);

if (respBodyPublisher == null) {
log.error(() -> "Publisher is null, onResponseHeadersDone() was never called");
throw new IllegalStateException("Publisher is null, onResponseHeadersDone() was never called");
}

// Queue a Deep Copy since bodyBytesIn is only guaranteed to contain valid memory for the lifetime of this
// function call, and it's memory can be reused once this function returns.
respBodyPublisher.queueBuffer(deepCopy(bodyBytesIn));
respBodyPublisher.queueBuffer(bodyBytesIn);
respBodyPublisher.publishToSubscribers();

if (bodyBytesIn.remaining() != 0) {
throw new IllegalStateException("Unprocessed bytes remain in bodyBytesIn Buffer!");
}

return 0;
}

Expand Down
Loading