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

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

                Author: ASF GitHub Bot
            Created on: 02/Jan/20 20:53
            Start Date: 02/Jan/20 20:53
    Worklog Time Spent: 10m 
      Work Description: boyuanzz commented on pull request #10482: [BEAM-5600] 
Add unimplemented split API to Runner side SDF libraries.
URL: https://github.com/apache/beam/pull/10482#discussion_r362624699
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
 ##########
 @@ -476,6 +511,38 @@ public void abort() {}
     }
   }
 
+  /**
+   * A {@link CloseableFnDataReceiver} which counts the number of elements 
that have been accepted.
+   */
+  private static class CountingFnDataReceiver<T> implements 
CloseableFnDataReceiver<T> {
+    private final CloseableFnDataReceiver delegate;
+    private long count;
+
+    private CountingFnDataReceiver(CloseableFnDataReceiver delegate) {
+      this.delegate = delegate;
+    }
+
+    public long getCount() {
+      return count;
+    }
+
+    @Override
+    public void accept(T input) throws Exception {
+      count += 1;
 
 Review comment:
   I'm not sure whether the data channel does something like buffering. I'm 
curious whether the count should be counted `when `flush` is called?
 
----------------------------------------------------------------
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: 365488)
    Time Spent: 2h 50m  (was: 2h 40m)

> Splitting for SplittableDoFn should be exposed within runner shared libraries
> -----------------------------------------------------------------------------
>
>                 Key: BEAM-5600
>                 URL: https://issues.apache.org/jira/browse/BEAM-5600
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Scott Wegner
>            Priority: Major
>              Labels: portability
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




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

Reply via email to