You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/12/02 02:09:00 UTC

[jira] [Work logged] (BEAM-8374) PublishResult returned by SnsIO is missing sdkResponseMetadata and sdkHttpMetadata

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

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

                Author: ASF GitHub Bot
            Created on: 02/Dec/19 02:08
            Start Date: 02/Dec/19 02:08
    Worklog Time Spent: 10m 
      Work Description: jfarr commented on pull request #9758: [WIP][BEAM-8374] Enable returning missing PublishResult fields in SnsIO.Write
URL: https://github.com/apache/beam/pull/9758#discussion_r352396257
 
 

 ##########
 File path: sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsIO.java
 ##########
 @@ -256,9 +269,36 @@ public Write withResultOutputTag(TupleTag<PublishResult> results) {
       return builder().setResultOutputTag(results).build();
     }
 
+    /**
+     * Encode the full {@code PublishResult} object, including HTTP status code and response
+     * headers.
+     */
+    public Write withFullPublishResult() {
+      return builder()
+          .setCoderProvider(
+              CoderProviders.forCoder(
+                  TypeDescriptor.of(PublishResult.class), FullPublishResultCoder.of()))
+          .build();
+    }
+
+    /**
+     * Encode the minimal {@code PublishResult} object, including HTTP status code but excluding
+     * HTTP response headers.
 
 Review comment:
   Actually I left the default behavior the same for backward compatibility, i.e. encode only the messageId using (what is now called) DefaultPublishResultCoder. This method selects the MinimalPublishResultCoder which encodes messageId, requestId, and statusCode but not the HTTP headers. 
 
----------------------------------------------------------------
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


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

    Worklog Id:     (was: 351702)
    Time Spent: 3h 50m  (was: 3h 40m)

> PublishResult returned by SnsIO is missing sdkResponseMetadata and sdkHttpMetadata
> ----------------------------------------------------------------------------------
>
>                 Key: BEAM-8374
>                 URL: https://issues.apache.org/jira/browse/BEAM-8374
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-aws
>    Affects Versions: 2.13.0, 2.14.0, 2.15.0
>            Reporter: Jonothan Farr
>            Assignee: Jonothan Farr
>            Priority: Minor
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> Currently the PublishResultCoder in SnsIO only serializes the messageId field so the PublishResult returned by Beam returns null for getSdkResponseMetadata() and getSdkHttpMetadata(). This makes it impossible to check the HTTP status for errors, which is necessary since this is not handled in SnsIO.



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