Skip to content

Commit 21c40e0

Browse files
authored
Merge pull request #1913 from aws/zoewang/revertTM
Revert "Remove the use of S3NativeClient and integrate with S3Client …
2 parents a2109b5 + cf0d833 commit 21c40e0

35 files changed

+1719
-1201
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/interceptor/SdkInternalExecutionAttribute.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import software.amazon.awssdk.annotations.SdkProtectedApi;
1919
import software.amazon.awssdk.core.interceptor.trait.HttpChecksumRequired;
20-
import software.amazon.awssdk.http.SdkHttpExecutionAttributes;
2120

2221
/**
2322
* Attributes that can be applied to all sdk requests. Only generated code from the SDK clients should set these values.
@@ -48,12 +47,6 @@ public final class SdkInternalExecutionAttribute extends SdkExecutionAttribute {
4847
public static final ExecutionAttribute<Boolean> DISABLE_HOST_PREFIX_INJECTION =
4948
new ExecutionAttribute<>("DisableHostPrefixInjection");
5049

51-
/**
52-
* The SDK HTTP attributes that can be passed to the HTTP client
53-
*/
54-
public static final ExecutionAttribute<SdkHttpExecutionAttributes> SDK_HTTP_EXECUTION_ATTRIBUTES =
55-
new ExecutionAttribute<>("SdkHttpExecutionAttributes");
56-
5750
private SdkInternalExecutionAttribute() {
5851
}
5952
}

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/MakeAsyncHttpRequestStage.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
package software.amazon.awssdk.core.internal.http.pipeline.stages;
1717

18-
import static software.amazon.awssdk.core.interceptor.SdkInternalExecutionAttribute.SDK_HTTP_EXECUTION_ATTRIBUTES;
1918
import static software.amazon.awssdk.core.internal.http.timers.TimerUtils.resolveTimeoutInMillis;
2019
import static software.amazon.awssdk.http.Header.CONTENT_LENGTH;
2120

@@ -181,19 +180,15 @@ private CompletableFuture<Response<OutputT>> executeHttpRequest(SdkHttpFullReque
181180

182181
MetricCollector httpMetricCollector = MetricUtils.createHttpMetricsCollector(context);
183182

184-
AsyncExecuteRequest.Builder executeRequestBuilder = AsyncExecuteRequest.builder()
183+
AsyncExecuteRequest executeRequest = AsyncExecuteRequest.builder()
185184
.request(requestWithContentLength)
186185
.requestContentPublisher(requestProvider)
187186
.responseHandler(wrappedResponseHandler)
188187
.fullDuplex(isFullDuplex(context.executionAttributes()))
189-
.metricCollector(httpMetricCollector);
190-
if (context.executionAttributes().getAttribute(SDK_HTTP_EXECUTION_ATTRIBUTES) != null) {
191-
executeRequestBuilder.httpExecutionAttributes(
192-
context.executionAttributes()
193-
.getAttribute(SDK_HTTP_EXECUTION_ATTRIBUTES));
194-
}
188+
.metricCollector(httpMetricCollector)
189+
.build();
195190

196-
CompletableFuture<Void> httpClientFuture = doExecuteHttpRequest(context, executeRequestBuilder.build());
191+
CompletableFuture<Void> httpClientFuture = doExecuteHttpRequest(context, executeRequest);
197192

198193
TimeoutTracker timeoutTracker = setupAttemptTimer(responseFuture, context);
199194
context.apiCallAttemptTimeoutTracker(timeoutTracker);

http-client-spi/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@
8080
<artifactId>reactive-streams-tck</artifactId>
8181
<scope>test</scope>
8282
</dependency>
83-
<dependency>
84-
<groupId>nl.jqno.equalsverifier</groupId>
85-
<artifactId>equalsverifier</artifactId>
86-
<scope>test</scope>
87-
</dependency>
8883
</dependencies>
8984

9085
<build>

http-client-spi/src/main/java/software/amazon/awssdk/http/SdkHttpExecutionAttribute.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

http-client-spi/src/main/java/software/amazon/awssdk/http/SdkHttpExecutionAttributes.java

Lines changed: 0 additions & 109 deletions
This file was deleted.

http-client-spi/src/main/java/software/amazon/awssdk/http/async/AsyncExecuteRequest.java

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717

1818
import java.util.Optional;
1919
import software.amazon.awssdk.annotations.SdkPublicApi;
20-
import software.amazon.awssdk.http.SdkHttpExecutionAttribute;
21-
import software.amazon.awssdk.http.SdkHttpExecutionAttributes;
2220
import software.amazon.awssdk.http.SdkHttpRequest;
2321
import software.amazon.awssdk.metrics.MetricCollector;
24-
import software.amazon.awssdk.utils.Validate;
2522

2623
/**
2724
* Request object containing the parameters necessary to make an asynchronous HTTP request.
@@ -35,15 +32,13 @@ public final class AsyncExecuteRequest {
3532
private final SdkAsyncHttpResponseHandler responseHandler;
3633
private final MetricCollector metricCollector;
3734
private final boolean isFullDuplex;
38-
private final SdkHttpExecutionAttributes sdkHttpExecutionAttributes;
3935

4036
private AsyncExecuteRequest(BuilderImpl builder) {
4137
this.request = builder.request;
4238
this.requestContentPublisher = builder.requestContentPublisher;
4339
this.responseHandler = builder.responseHandler;
4440
this.metricCollector = builder.metricCollector;
4541
this.isFullDuplex = builder.isFullDuplex;
46-
this.sdkHttpExecutionAttributes = builder.executionAttributesBuilder.build();
4742
}
4843

4944
/**
@@ -81,13 +76,6 @@ public boolean fullDuplex() {
8176
return isFullDuplex;
8277
}
8378

84-
/**
85-
* @return the SDK HTTP execution attributes associated with this request
86-
*/
87-
public SdkHttpExecutionAttributes httpExecutionAttributes() {
88-
return sdkHttpExecutionAttributes;
89-
}
90-
9179
public static Builder builder() {
9280
return new BuilderImpl();
9381
}
@@ -137,25 +125,6 @@ public interface Builder {
137125
*/
138126
Builder fullDuplex(boolean fullDuplex);
139127

140-
/**
141-
* Put an HTTP execution attribute into to the collection of HTTP execution attributes for this request
142-
*
143-
* @param attribute The execution attribute object
144-
* @param value The value of the execution attribute.
145-
*/
146-
<T> Builder putHttpExecutionAttribute(SdkHttpExecutionAttribute<T> attribute, T value);
147-
148-
/**
149-
* Sets the additional HTTP execution attributes collection for this request.
150-
* <p>
151-
* This will override the attributes configured through
152-
* {@link #putHttpExecutionAttribute(SdkHttpExecutionAttribute, Object)}
153-
*
154-
* @param executionAttributes Execution attributes map for this request.
155-
* @return This object for method chaining.
156-
*/
157-
Builder httpExecutionAttributes(SdkHttpExecutionAttributes executionAttributes);
158-
159128
AsyncExecuteRequest build();
160129
}
161130

@@ -165,7 +134,6 @@ private static class BuilderImpl implements Builder {
165134
private SdkAsyncHttpResponseHandler responseHandler;
166135
private MetricCollector metricCollector;
167136
private boolean isFullDuplex;
168-
private SdkHttpExecutionAttributes.Builder executionAttributesBuilder = SdkHttpExecutionAttributes.builder();
169137

170138
@Override
171139
public Builder request(SdkHttpRequest request) {
@@ -197,20 +165,6 @@ public Builder fullDuplex(boolean fullDuplex) {
197165
return this;
198166
}
199167

200-
@Override
201-
public <T> Builder putHttpExecutionAttribute(SdkHttpExecutionAttribute<T> attribute, T value) {
202-
this.executionAttributesBuilder.put(attribute, value);
203-
return this;
204-
}
205-
206-
@Override
207-
public Builder httpExecutionAttributes(SdkHttpExecutionAttributes executionAttributes) {
208-
Validate.paramNotNull(executionAttributes, "executionAttributes");
209-
this.executionAttributesBuilder = executionAttributes.toBuilder();
210-
return this;
211-
}
212-
213-
214168
@Override
215169
public AsyncExecuteRequest build() {
216170
return new AsyncExecuteRequest(this);

http-client-spi/src/test/java/software/amazon/awssdk/http/SdkHttpExecutionAttributesTest.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<rxjava.version>2.2.21</rxjava.version>
115115
<commons-codec.verion>1.10</commons-codec.verion>
116116
<jmh.version>1.29</jmh.version>
117-
<awscrt.version>0.15.15</awscrt.version>
117+
<awscrt.version>0.15.8</awscrt.version>
118118

119119
<!--Test dependencies -->
120120
<junit5.version>5.8.1</junit5.version>

services-custom/s3-transfer-manager/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@
101101
<artifactId>aws-core</artifactId>
102102
<version>${awsjavasdk.version}</version>
103103
</dependency>
104+
<dependency>
105+
<groupId>software.amazon.awssdk</groupId>
106+
<artifactId>metrics-spi</artifactId>
107+
<version>${awsjavasdk.version}</version>
108+
</dependency>
104109
<dependency>
105110
<groupId>software.amazon.awssdk</groupId>
106111
<artifactId>service-test-utils</artifactId>

0 commit comments

Comments
 (0)