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

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

                Author: ASF GitHub Bot
            Created on: 24/Feb/19 19:00
            Start Date: 24/Feb/19 19:00
    Worklog Time Spent: 10m 
      Work Description: chamikaramj commented on pull request #7819: 
[BEAM-6655] Initial support for progress reporting over the FnAPI.
URL: https://github.com/apache/beam/pull/7819#discussion_r259633535
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/operations.py
 ##########
 @@ -584,19 +596,57 @@ def monitoring_infos(self, transform_id):
 
 class SdfProcessElements(DoOperation):
 
+  def __init__(self, *args, **kwargs):
+    super(SdfProcessElements, self).__init__(*args, **kwargs)
+    self.lock = threading.RLock()
+    self.element_start_output_bytes = None
+
   def process(self, o):
     with self.scoped_process_state:
-      delayed_application = self.dofn_runner.process_with_restriction(o)
-      if delayed_application:
-        self.execution_context.delayed_applications.append(
-            (self, delayed_application))
+      try:
+        with self.lock:
+          self.element_start_output_bytes = self._total_output_bytes()
+          for receiver in self.tagged_receivers.values():
+            receiver.opcounter.restart_sampling()
+        delayed_application = self.dofn_runner.process_with_restriction(o)
 
 Review comment:
   Please add a comment that we do not want to include this in self.lock which 
would prevent reporting progress while an element is being processed.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 203284)
    Time Spent: 1h 20m  (was: 1h 10m)

> Support progress reporting over FnAPI
> -------------------------------------
>
>                 Key: BEAM-6655
>                 URL: https://issues.apache.org/jira/browse/BEAM-6655
>             Project: Beam
>          Issue Type: New Feature
>          Components: beam-model, sdk-java-harness, sdk-py-harness
>            Reporter: Robert Bradshaw
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to