[
https://issues.apache.org/jira/browse/BEAM-5605?focusedWorklogId=378929&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-378929
]
ASF GitHub Bot logged work on BEAM-5605:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jan/20 17:13
Start Date: 29/Jan/20 17:13
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #10702: [BEAM-5605]
Migrate splittable DoFn methods to use "new" DoFn style argument providing.
URL: https://github.com/apache/beam/pull/10702#discussion_r372516471
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
##########
@@ -758,11 +804,19 @@ public Duration getAllowedTimestampSkew() {
* Annotation for the method that maps an element to an initial restriction
for a <a
* href="https://s.apache.org/splittable-do-fn">splittable</a> {@link DoFn}.
*
- * <p>Signature: {@code RestrictionT getInitialRestriction(InputT element,
<optional arguments>);}
+ * <p>Signature: {@code RestrictionT getInitialRestriction(<arguments>);}
*
- * <p>The optional arguments are allowed to be:
+ * <p>This method must satisfy the following constraints:
*
* <ul>
+ * <li>The return type {@code RestrictionT} defines the restriction type
used within this
+ * splittable DoFn. All other methods that use a {@link Restriction
@Restriction} parameter
+ * must use the same type that is used here. It is suggested to use as
narrow of a return
+ * type definition as possible (for example prefer to use a square
type over a shape type as
+ * a square is a type of a shape).
+ * <li>If one of its arguments is tagged with the {@link Element}
annotation, then it will be
+ * passed the current element being processed; the argument must be of
type {@code InputT}.
+ * Note that schema element parameters are currently unsupported.
Review comment:
I would also suggest updating the DoFn documentation related to schemas
since the docs around what is FieldAccess and how @Element parameters interact
seems to be incorrect since the documentation currently states that "the
argument type must match the input type of this DoFn"
----------------------------------------------------------------
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: 378929)
Time Spent: 10.5h (was: 10h 20m)
> Support Portable SplittableDoFn for batch
> -----------------------------------------
>
> Key: BEAM-5605
> URL: https://issues.apache.org/jira/browse/BEAM-5605
> Project: Beam
> Issue Type: New Feature
> Components: sdk-java-core
> Reporter: Scott Wegner
> Assignee: Luke Cwik
> Priority: Major
> Labels: portability
> Time Spent: 10.5h
> Remaining Estimate: 0h
>
> Roll-up item tracking work towards supporting portable SplittableDoFn for
> batch
--
This message was sent by Atlassian Jira
(v8.3.4#803005)