[
https://issues.apache.org/jira/browse/BEAM-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kenneth Knowles updated BEAM-10673:
-----------------------------------
Resolution: Fixed
Status: Resolved (was: Resolved)
Hello! Due to a bug in our Jira configuration, this issue had status:Resolved
but resolution:Unresolved.
I am bulk editing these issues to have resolution:Fixed
If a different resolution is appropriate, please change it. To do this, click
the "Resolve" button (you can do this even for closed issues) and set the
Resolution field to the right value.
> DynamoDBIO.RetryConfiguration in AWS v2 is not correctly exposed
> ----------------------------------------------------------------
>
> Key: BEAM-10673
> URL: https://issues.apache.org/jira/browse/BEAM-10673
> Project: Beam
> Issue Type: Bug
> Components: io-java-aws
> Affects Versions: 2.23.0
> Reporter: Dennis Yung
> Assignee: Dennis Yung
> Priority: P2
> Fix For: 2.25.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> As described in the documentation, DynamoDBIO is initiated with a
> RetryConfiguration through withRetryConfiguration()
> {code:java}
> PCollection<T> data = ...;
> data.apply(
> DynamoDBIO.<WriteRequest>write()
> .withWriteRequestMapperFn(
> (SerializableFunction<T, KV<String, WriteRequest>>)
> //Transforming your T data into KV<String,
> WriteRequest>
> t -> KV.of(tableName, writeRequest))
> .withRetryConfiguration(
> DynamoDBIO.RetryConfiguration.create(5,
> Duration.standardMinutes(1)))
> .withAwsClientsProvider(new BasicDynamoDbProvider(accessKey,
> secretKey, region));
> {code}
> It works on beam-sdks-java-io-amazon-web-services (aws sdk version 1), but
> not on beam-sdks-java-io-amazon-web-services2 (aws sdk version 2).
> It is because io.aws2.dynamodb.DynamoDBIO.RetryConfiguration adopted a
> AutoValue builder design in place of the create method. However, the builder
> do not have public methods for setting values and building a
> RetryConfiguration. Moreover, validation was not implemented
> {code:java}
> @AutoValue
> public abstract static class RetryConfiguration implements Serializable {
>
> /.../
> public static Builder builder() {
> return new AutoValue_DynamoDBIO_RetryConfiguration.Builder();
> }
> @AutoValue.Builder
> abstract static class Builder {
> abstract Builder setMaxAttempts(int maxAttempts);
> abstract Builder setMaxDuration(Duration maxDuration);
> abstract Builder setRetryPredicate(RetryPredicate retryPredicate);
> abstract RetryConfiguration build();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)