[
https://issues.apache.org/jira/browse/BEAM-8100?focusedWorklogId=316788&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-316788
]
ASF GitHub Bot logged work on BEAM-8100:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Sep/19 16:23
Start Date: 23/Sep/19 16:23
Worklog Time Spent: 10m
Work Description: lukecwik commented on issue #9499: [BEAM-8100]
Exception handling for AsJsons and ParseJsons
URL: https://github.com/apache/beam/pull/9499#issuecomment-534175290
It is easier to maintain but I do think it would be easy for us to have a
copy of all the methods call the underlying MapElements without needing for
users to know to invoke unwrapped. Some people discover the API via code
completion and unwrapped is an unlikely place users will look.
On Mon, Sep 23, 2019 at 8:42 AM Jeff Klukas <[email protected]>
wrote:
> I'm having a realization that we could probably avoid most of the
> complexity here if ParseJsons simply returned the MapElements transform
> it builds rather than wrapping it. I don't think that's particularly an
> option since users already have code that expects an object of type
> ParseJsons, but what if we exposed a method to return the underlying
> MapElements so that users could call the existing error handling methods?
> It might look like:
>
> PCollection<String> p = ...
> p.apply(ParseJsons
> .of(MyClass.class)
> .unwrapped()
> .exceptionsVia(...))
>
> This is slightly less convenient for the user, as they have to know about
> and invoke the unwrapped method (we can probably come up with a better
> name), but it avoids us having to re-implement all the logic from
> MapElements and it would establish a pattern by which other simple
> transforms that wrap a MapElements invocation could provide error
> handling.
>
> What do you think of that approach?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
<https://github.com/apache/beam/pull/9499?email_source=notifications&email_token=ACM4V3DVGQGM55BZZAU2QC3QLDPWJA5CNFSM4IUG72S2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7LJVPI#issuecomment-534158013>,
> or mute the thread
>
<https://github.com/notifications/unsubscribe-auth/ACM4V3A5LLATCTPHUBYBWDTQLDPWJANCNFSM4IUG72SQ>
> .
>
----------------------------------------------------------------
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: 316788)
Time Spent: 2.5h (was: 2h 20m)
> Add exception handling to Json transforms in Java SDK
> -----------------------------------------------------
>
> Key: BEAM-8100
> URL: https://issues.apache.org/jira/browse/BEAM-8100
> Project: Beam
> Issue Type: Improvement
> Components: extensions-java-json, sdk-java-core
> Reporter: Jeff Klukas
> Assignee: Alexey Romanenko
> Priority: Minor
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Follow-up to https://issues.apache.org/jira/browse/BEAM-5638. We have
> exception handling for MapElements and FlatMapElements. It should be
> straightforward to add parallel signatures to AsJsons and ParseJsons for
> catching parsing errors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)