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

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

                Author: ASF GitHub Bot
            Created on: 05/Oct/18 19:36
            Start Date: 05/Oct/18 19:36
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #6586: 
[BEAM-5638] Exception handling for Java single message transforms
URL: https://github.com/apache/beam/pull/6586#discussion_r223117715
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
 ##########
 @@ -162,4 +171,89 @@ public void populateDisplayData(DisplayData.Builder 
builder) {
       builder.include("fn", (HasDisplayData) originalFnForDisplayData);
     }
   }
+
+  /**
+   * Sets a {@link TupleTag} to associate with successes, converting this 
{@link PTransform} into
+   * one that returns a {@link PCollectionTuple}. This allows you to make 
subsequent {@link
+   * WithFailures#withFailureTag(TupleTag, Class, Class[])} calls to capture 
thrown exceptions to
+   * failure collections.
+   */
+  public WithFailures withSuccessTag(TupleTag<OutputT> successTag) {
+    return new WithFailures(successTag, TaggedExceptionsList.empty());
+  }
 
 Review comment:
   consider adding both withSuccessTag and withFailureTag at the top level so 
that users can call them in either order.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 151818)
            Time Spent: 1h 40m  (was: 1.5h)
    Remaining Estimate: 166h 20m  (was: 166.5h)

> Add exception handling to single message transforms in Java SDK
> ---------------------------------------------------------------
>
>                 Key: BEAM-5638
>                 URL: https://issues.apache.org/jira/browse/BEAM-5638
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Jeff Klukas
>            Assignee: Jeff Klukas
>            Priority: Minor
>   Original Estimate: 168h
>          Time Spent: 1h 40m
>  Remaining Estimate: 166h 20m
>
> Add methods to MapElements, FlatMapElements, and Filter that allow users to 
> specify expected exceptions and tuple tags to associate with the with 
> collections of the successfully and unsuccessfully processed elements.
> See discussion on dev list:
> https://lists.apache.org/thread.html/936ed2a5f2c01be066fd903abf70130625e0b8cf4028c11b89b8b23f@%3Cdev.beam.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to