You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/31 14:35:54 UTC

[GitHub] [beam] iemejia commented on a change in pull request #12658: [BEAM-10673] Add public methods to RetryConfiguration.Builder in DynamoDBIO (aws2)

iemejia commented on a change in pull request #12658:
URL: https://github.com/apache/beam/pull/12658#discussion_r480162673



##########
File path: sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/dynamodb/DynamoDBIO.java
##########
@@ -293,21 +296,32 @@ public void processElement(@Element Read<T> spec, OutputReceiver<T> out) {
 
     abstract RetryPredicate getRetryPredicate();
 
-    abstract Builder toBuilder();
+    public abstract Builder toBuilder();

Review comment:
       This does not need to be public.

##########
File path: sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/dynamodb/DynamoDBIO.java
##########
@@ -111,7 +111,10 @@
  *                       //Transforming your T data into KV<String, WriteRequest>
  *                       t -> KV.of(tableName, writeRequest))
  *               .withRetryConfiguration(
- *                    DynamoDBIO.RetryConfiguration.create(5, Duration.standardMinutes(1)))
+ *                     DynamoDBIO.RetryConfiguration.builder()

Review comment:
       :+1: 

##########
File path: sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/dynamodb/DynamoDBIO.java
##########
@@ -293,21 +296,32 @@ public void processElement(@Element Read<T> spec, OutputReceiver<T> out) {
 
     abstract RetryPredicate getRetryPredicate();
 
-    abstract Builder toBuilder();
+    public abstract Builder toBuilder();
 
     public static Builder builder() {
-      return new AutoValue_DynamoDBIO_RetryConfiguration.Builder();
+      return new AutoValue_DynamoDBIO_RetryConfiguration.Builder()
+          .setRetryPredicate(DEFAULT_RETRY_PREDICATE);
     }
 
     @AutoValue.Builder
     abstract static class Builder {

Review comment:
       This class should be public so it can be used.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org