Skip to content
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

Update to AWS SDK 1.11.223 #27278

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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