[ 
https://issues.apache.org/jira/browse/BEAM-11331?focusedWorklogId=518556&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-518556
 ]

ASF GitHub Bot logged work on BEAM-11331:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Dec/20 17:32
            Start Date: 01/Dec/20 17:32
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on a change in pull request 
#13411:
URL: https://github.com/apache/beam/pull/13411#discussion_r533594798



##########
File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/options/AwsOptions.java
##########
@@ -38,9 +38,9 @@
   /** AWS region used by the AWS client. */
   @Description("AWS region used by the AWS client")
   @Validation.Required
-  String getRegion();

Review comment:
       Yes, makes sense. But don't you think we have to change it to avoid 
naming conflicts? Also, looking into the code, I don't see if these options 
have been even used before for AWS v2.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 518556)
    Time Spent: 40m  (was: 0.5h)

> AwsOptions from sdk.io.aws2 is incompatible with DataflowPipelineOptions
> ------------------------------------------------------------------------
>
>                 Key: BEAM-11331
>                 URL: https://issues.apache.org/jira/browse/BEAM-11331
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-aws
>    Affects Versions: 2.25.0
>            Reporter: Dennis Yung
>            Assignee: Dennis Yung
>            Priority: P2
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When using connectors from the aws2 module, build will fail with 
> {code:java}
> java.lang.IllegalArgumentException: Expected getter for property [region] to 
> be marked with @Default on all 
> [org.apache.beam.runners.dataflow.options.DataflowPipelineOptions, 
> org.apache.beam.sdk.io.aws2.options.AwsOptions], found only on 
> [org.apache.beam.runners.dataflow.options.DataflowPipelineOptions]
> {code}
> Example:
> {code:java}
> package org.example;
> import org.apache.beam.sdk.Pipeline;
> import org.apache.beam.sdk.io.aws2.sqs.SqsIO;
> public class SqsConsume {
>   static void runSqsConsume() {
>     Pipeline p = Pipeline.create();
>     p.apply("ReadLines", SqsIO.read().withQueueUrl("sqs_url"));
>     p.run().waitUntilFinish();
>   }
>   public static void main(String[] args) {
>     runSqsConsume();
>   }
> }
> {code}
> Exception:
> {code:java}
> Exception in thread "main" java.lang.ExceptionInInitializerError
>       at org.apache.beam.sdk.Pipeline.create(Pipeline.java:141)
>       at org.example.SqsConsume.runSqsConsume(SqsConsume.java:37)
>       at org.example.SqsConsume.main(SqsConsume.java:49)
> Caused by: java.lang.IllegalArgumentException: Expected getter for property 
> [region] to be marked with @Default on all 
> [org.apache.beam.runners.dataflow.options.DataflowPipelineOptions, 
> org.apache.beam.sdk.io.aws2.options.AwsOptions], found only on 
> [org.apache.beam.runners.dataflow.options.DataflowPipelineOptions]
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.throwForGettersWithInconsistentAnnotation(PipelineOptionsFactory.java:1340)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.validateGettersHaveConsistentAnnotation(PipelineOptionsFactory.java:1142)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.validateMethodAnnotations(PipelineOptionsFactory.java:1044)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.validateClass(PipelineOptionsFactory.java:973)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.access$2200(PipelineOptionsFactory.java:115)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.validateWellFormed(PipelineOptionsFactory.java:1901)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.validateWellFormed(PipelineOptionsFactory.java:1842)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.register(PipelineOptionsFactory.java:1837)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.initializeRegistry(PipelineOptionsFactory.java:1825)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.<init>(PipelineOptionsFactory.java:1817)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory$Cache.<init>(PipelineOptionsFactory.java:1786)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.resetCache(PipelineOptionsFactory.java:542)
>       at 
> org.apache.beam.sdk.options.PipelineOptionsFactory.<clinit>(PipelineOptionsFactory.java:508)
>       ... 3 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to