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

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_r372137192
 
 

 ##########
 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.
 
 Review comment:
   nit: maybe this should be first and should read `The type of restrictions, 
{@code R}, used in all restriction methods must be the same.`
   Then you can reference R elsewhere without having to define it again.
   
   Up to you, just an idea I had that may increase clarity
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 378614)
    Time Spent: 9h 40m  (was: 9.5h)

> 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: 9h 40m
>  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)

Reply via email to