[
https://issues.apache.org/jira/browse/BEAM-5605?focusedWorklogId=378612&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-378612
]
ASF GitHub Bot logged work on BEAM-5605:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jan/20 01:17
Start Date: 29/Jan/20 01:17
Worklog Time Spent: 10m
Work Description: TheNeuralBit 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_r372141617
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
##########
@@ -614,45 +612,93 @@ public Duration getAllowedTimestampSkew() {
* <p>See <a href="https://s.apache.org/splittable-do-fn">the proposal</a>
for an overview of the
* involved concepts (<i>splittable DoFn</i>, <i>restriction</i>,
<i>restriction tracker</i>).
*
- * <p>If a {@link DoFn} is splittable, the following constraints must be
respected:
+ * <p>A splittable {@link DoFn} must obey the following constraints:
*
* <ul>
* <li>It <i>must</i> define a {@link GetInitialRestriction} method.
- * <li>It <i>may</i> define a {@link GetSize} method.
- * <li>It <i>may</i> define a {@link SplitRestriction} method.
+ * <li>It <i>should</i> define a {@link GetSize} method or ensure that the
{@link
+ * RestrictionTracker} implements {@link Sizes.HasSize}.
+ * <li>It <i>should</i> define a {@link SplitRestriction} method.
* <li>It <i>may</i> define a {@link NewTracker} method returning a
subtype of {@code
* RestrictionTracker<R>} where {@code R} is the restriction type
returned by {@link
* GetInitialRestriction}. This method is optional in case the
restriction type returned by
* {@link GetInitialRestriction} implements {@link HasDefaultTracker}.
* <li>It <i>may</i> define a {@link GetRestrictionCoder} method.
* <li>The type of restrictions used by all of these methods must be the
same.
- * <li>Its {@link ProcessElement} method <i>may</i> return a {@link
ProcessContinuation} to
- * indicate whether there is more work to be done for the current
element.
- * <li>Its {@link ProcessElement} method <i>must not</i> use any extra
context parameters, such
- * as {@link BoundedWindow}.
* <li>The {@link DoFn} itself <i>may</i> be annotated with {@link
BoundedPerElement} or {@link
* UnboundedPerElement}, but not both at the same time. If it's not
annotated with either of
* these, it's assumed to be {@link BoundedPerElement} if its {@link
ProcessElement} method
* returns {@code void} and {@link UnboundedPerElement} if it returns
a {@link
* ProcessContinuation}.
+ * <li>Timers and state must not be used.
* </ul>
*
* <p>A non-splittable {@link DoFn} <i>must not</i> define any of these
methods.
+ *
+ * <p>This method must satisfy the following constraints:
Review comment:
Would be helpful to add an "If this DoFn is splittable," here just to be
very clear.
----------------------------------------------------------------
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: 378612)
> 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: 9.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)