[
https://issues.apache.org/jira/browse/BEAM-5638?focusedWorklogId=151723&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-151723
]
ASF GitHub Bot logged work on BEAM-5638:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Oct/18 17:10
Start Date: 05/Oct/18 17:10
Worklog Time Spent: 10m
Work Description: jklukas 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_r223078577
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
##########
@@ -125,9 +129,19 @@ private FlatMapElements(
fn, fn.getClosure(), TypeDescriptors.inputOf(fn.getClosure()),
outputType);
}
+ private void checkOutputType() {
+ checkState(
+ outputType != null,
+ "%s output type descriptor was null; "
+ + "this probably means that getOutputTypeDescriptor() was called
after "
+ + "serialization/deserialization, but it is only available prior
to "
+ + "serialization, for constructing a pipeline and inferring
coders",
+ FlatMapElements.class.getSimpleName());
+ }
+
@Override
public PCollection<OutputT> expand(PCollection<? extends InputT> input) {
- checkArgument(fn != null, ".via() is required");
+ checkNotNull(fn, ".via() is required");
Review comment:
This is an additional change to keep style more consistent with the other
transforms.
----------------------------------------------------------------
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: 151723)
Time Spent: 20m (was: 10m)
Remaining Estimate: 167h 40m (was: 167h 50m)
> 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: 20m
> Remaining Estimate: 167h 40m
>
> 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)