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

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

                Author: ASF GitHub Bot
            Created on: 31/Mar/18 07:15
            Start Date: 31/Mar/18 07:15
    Worklog Time Spent: 10m 
      Work Description: mariapython commented on a change in pull request 
#4949: [BEAM-3818] Add support for streaming side inputs in the DirectRunner 
(part 2: unblock tasks as the _SideInputsContainer gets updated) 
URL: https://github.com/apache/beam/pull/4949#discussion_r178425458
 
 

 ##########
 File path: sdks/python/apache_beam/runners/direct/evaluation_context.py
 ##########
 @@ -69,67 +69,109 @@ class _SideInputsContainer(object):
   to a side input.
   """
 
-  def __init__(self, views):
+  def __init__(self, side_inputs):
     self._lock = threading.Lock()
     self._views = {}
-    self._transform_to_views = collections.defaultdict(list)
+    self._transform_to_side_inputs = collections.defaultdict(list)
+    self._side_input_to_blocked_tasks = collections.defaultdict(list)
 
-    for view in views:
-      self._views[view] = _SideInputView(view)
-      self._transform_to_views[view.pvalue.producer].append(view)
+    for side in side_inputs:
+      self._views[side] = _SideInputView(side)
+      self._transform_to_side_inputs[side.pvalue.producer].append(side)
 
   def __repr__(self):
     views_string = (', '.join(str(elm) for elm in self._views.values())
                     if self._views.values() else '[]')
     return '_SideInputsContainer(_views=%s)' % views_string
 
-  def get_value_or_schedule_after_output(self, side_input, task):
+  def get_value_or_block_until_ready(self, side_input, task, block_until):
+    """Returns the value of a view whose task is unblocked or blocks its task.
+
+    It returns the value of a view whose watermark has been updated and
+    surpasses a given value.
+
+    Args:
+      side_input: (_UnpickledSideInput) value.
+      task: (TransformExecutor) task waiting on a side input.
+      block_until: Timestamp after which the task gets unblocked.
+
+    Returns:
+      The (SideInputMap) value of a view when the tasks it blocks are unblocked
 
 Review comment:
   Done.

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 86266)
    Time Spent: 8h 10m  (was: 8h)

> Add support for the streaming side inputs in the Python DirectRunner
> --------------------------------------------------------------------
>
>                 Key: BEAM-3818
>                 URL: https://issues.apache.org/jira/browse/BEAM-3818
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>            Reporter: María GH
>            Assignee: María GH
>            Priority: Minor
>             Fix For: 3.0.0
>
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> The streaming DirectRunner should support streaming side input semantics.  
> Currently, side inputs are only available for globally-windowed side input 
> PCollections.
> Also, empty side inputs cause a pipeline stall.



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

Reply via email to