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

ASF GitHub Bot logged work on BEAM-10341:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Jul/20 03:29
            Start Date: 04/Jul/20 03:29
    Worklog Time Spent: 10m 
      Work Description: boyuanzz commented on a change in pull request #12016:
URL: https://github.com/apache/beam/pull/12016#discussion_r449734236



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java
##########
@@ -95,7 +96,8 @@ void invokeOnTimer(
   void invokeSplitRestriction(ArgumentProvider<InputT, OutputT> arguments);
 
   /** Invoke the {@link TruncateRestriction} method on the bound {@link DoFn}. 
*/
-  void invokeTruncateRestriction(ArgumentProvider<InputT, OutputT> arguments);
+  <RestrictionT> Optional<RestrictionT> invokeTruncateRestriction(

Review comment:
       My intent was to use `Optional.empty()` to represent there is no more 
work. So we could have 2 options:
   1. Use `Optional.empty()` as a notion of no more remaining work and use 
`Optional.of(value)` as a  notion of bounded remaining work.
   2. Change the function signature to `@Nullable RestrictionT 
truncateRestriction()`, where `null` means no more work.
   
   I don't have a strong preference over these 2 options. But 2 is more 
consistent with python.




----------------------------------------------------------------
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: 454495)
    Time Spent: 4h 40m  (was: 4.5h)

> Support drain in SDF
> --------------------
>
>                 Key: BEAM-10341
>                 URL: https://issues.apache.org/jira/browse/BEAM-10341
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-harness, sdk-py-harness
>            Reporter: Boyuan Zhang
>            Priority: P2
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to