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

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

                Author: ASF GitHub Bot
            Created on: 18/Nov/19 17:54
            Start Date: 18/Nov/19 17:54
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on pull request #9935: 
[BEAM-7636] Migrate SqsIO to AWS SDK for Java 2
URL: https://github.com/apache/beam/pull/9935#discussion_r347520632
 
 

 ##########
 File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/sqs/SqsIO.java
 ##########
 @@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.aws2.sqs;
+
+import static 
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
+
+import com.google.auto.value.AutoValue;
+import java.net.URI;
+import javax.annotation.Nullable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.io.aws2.options.AwsOptions;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.PBegin;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PDone;
+import org.joda.time.Duration;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.services.sqs.SqsClient;
+import software.amazon.awssdk.services.sqs.model.SendMessageRequest;
+
+/**
+ * An unbounded source for Amazon Simple Queue Service (SQS).
+ *
+ * <h3>Reading from an SQS queue</h3>
+ *
+ * <p>The {@link SqsIO} {@link Read} returns an unbounded {@link PCollection} 
of {@link
+ * software.amazon.awssdk.services.sqs.model.Message} containing the received 
messages. Note: This
+ * source does not currently advance the watermark when no new messages are 
received.
+ *
+ * <p>To configure an SQS source, you have to provide the queueUrl to connect 
to. The following
+ * example illustrates how to configure the source:
+ *
+ * <pre>{@code
+ * pipeline.apply(SqsIO.read().withQueueUrl(queueUrl))
+ * }</pre>
+ *
+ * <h3>Writing to an SQS queue</h3>
+ *
+ * <p>The following example illustrates how to use the sink:
+ *
+ * <pre>{@code
+ * pipeline
+ *   .apply(...) // returns PCollection<SendMessageRequest>
+ *   .apply(SqsIO.write())
+ * }</pre>
+ *
+ * <h3>Additional Configuration</h3>
+ *
+ * <p>Additional configuration can be provided via {@link AwsOptions} from 
command line args or in
 
 Review comment:
   I think this part should be changed according to new 
`withSqsClientProvider(...)` methods.
 
----------------------------------------------------------------
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: 345466)
    Time Spent: 40m  (was: 0.5h)

> Migrate SqsIO to AWS SDK for Java 2
> -----------------------------------
>
>                 Key: BEAM-7636
>                 URL: https://issues.apache.org/jira/browse/BEAM-7636
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-java-aws
>            Reporter: Ismaël Mejía
>            Assignee: Cam Mach
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




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

Reply via email to