Skip to content

Commit

Permalink
Update to AWS SDK 1.11.223 (#27278)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Nov 10, 2017
1 parent afab439 commit cebbc5f
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/plugins/repository-s3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ are marked as `Secure`.

`use_throttle_retries`::

Whether retries should be throttled (ie use backoff). Must be `true` or `false`. Defaults to `false`.
Whether retries should be throttled (ie use backoff). Must be `true` or `false`. Defaults to `true`.

[[repository-s3-repository]]
==== Repository Settings
Expand Down
11 changes: 10 additions & 1 deletion plugins/repository-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ esplugin {
}

versions << [
'aws': '1.10.69'
'aws': '1.11.223'
]

dependencies {
Expand Down Expand Up @@ -76,6 +76,15 @@ thirdPartyAudit.excludes = [
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'software.amazon.ion.IonReader',
'software.amazon.ion.IonSystem',
'software.amazon.ion.IonType',
'software.amazon.ion.IonWriter',
'software.amazon.ion.Timestamp',
'software.amazon.ion.system.IonBinaryWriterBuilder',
'software.amazon.ion.system.IonSystemBuilder',
'software.amazon.ion.system.IonTextWriterBuilder',
'software.amazon.ion.system.IonWriterBuilder',
]

// jarhell with jdk (intentionally, because jaxb was removed from default modules in java 9)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3993cb44f5856fa721b7b7ccfc266377c0bf9c0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c24e6ebe108c60a08098aeaad5ae0b6a5a77b618

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2ef96732e22d97952fbcd0a94f1dc376d157eda
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.HttpMethod;
import com.amazonaws.regions.Region;
import com.amazonaws.services.s3.AbstractAmazonS3;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.S3ClientOptions;
import com.amazonaws.services.s3.S3ResponseMetadata;
Expand Down Expand Up @@ -118,15 +119,14 @@
import java.util.List;

@SuppressForbidden(reason = "implements AWS api that uses java.io.File!")
public class AmazonS3Wrapper implements AmazonS3 {
public class AmazonS3Wrapper extends AbstractAmazonS3 {

protected AmazonS3 delegate;

public AmazonS3Wrapper(AmazonS3 delegate) {
this.delegate = delegate;
}


@Override
public void setEndpoint(String endpoint) {
delegate.setEndpoint(endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ private void assertCredentials(Settings singleRepositorySettings, Settings setti
}

public void testAWSDefaultConfiguration() {
launchAWSConfigurationTest(Settings.EMPTY, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3, false,
ClientConfiguration.DEFAULT_SOCKET_TIMEOUT);
launchAWSConfigurationTest(Settings.EMPTY, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3,
ClientConfiguration.DEFAULT_THROTTLE_RETRIES, ClientConfiguration.DEFAULT_SOCKET_TIMEOUT);
}

public void testAWSConfigurationWithAwsSettings() {
Expand All @@ -111,23 +111,22 @@ public void testAWSConfigurationWithAwsSettings() {
.put("s3.client.default.read_timeout", "10s")
.build();
launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTP, "aws_proxy_host", 8080, "aws_proxy_username",
"aws_proxy_password", 3, false, 10000);
"aws_proxy_password", 3, ClientConfiguration.DEFAULT_THROTTLE_RETRIES, 10000);
}

public void testRepositoryMaxRetries() {
Settings settings = Settings.builder()
.put("s3.client.default.max_retries", 5)
.build();
launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null,
null, 5, false, 50000);
null, 5, ClientConfiguration.DEFAULT_THROTTLE_RETRIES, 50000);
}

public void testRepositoryThrottleRetries() {
Settings settings = Settings.builder()
.put("s3.client.default.use_throttle_retries", true)
.build();
launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null,
null, 3, true, 50000);
final boolean throttling = randomBoolean();

Settings settings = Settings.builder().put("s3.client.default.use_throttle_retries", throttling).build();
launchAWSConfigurationTest(settings, Settings.EMPTY, Protocol.HTTPS, null, -1, null, null, 3, throttling, 50000);
}

private void launchAWSConfigurationTest(Settings settings,
Expand Down

0 comments on commit cebbc5f

Please sign in to comment.