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

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

                Author: ASF GitHub Bot
            Created on: 26/Oct/18 18:24
            Start Date: 26/Oct/18 18:24
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #6844: 
[BEAM-5617] Use bytes consistently for pcollection ids.
URL: https://github.com/apache/beam/pull/6844#discussion_r228621695
 
 

 ##########
 File path: sdks/python/apache_beam/runners/portability/fn_api_runner.py
 ##########
 @@ -1106,16 +1105,16 @@ def extract_endpoints(stage):
                 key=key))
         controller.state_handler.blocking_append(state_key, elements_data)
 
-    def get_buffer(pcoll_id):
-      if (pcoll_id.startswith(b'materialize:')
-          or pcoll_id.startswith(b'timers:')):
-        if pcoll_id not in pcoll_buffers:
+    def get_buffer(buffer_id):
+      kind, name = split_buffer_id(buffer_id)
+      if kind in ('materialize, timers'):
+        if buffer_id not in pcoll_buffers:
           # Just store the data chunks for replay.
-          pcoll_buffers[pcoll_id] = list()
-      elif pcoll_id.startswith(b'group:'):
+          pcoll_buffers[buffer_id] = list()
 
 Review comment:
   It would be helpful to add a docstring to `run_stage`, and document the 
types of the arguments, in particular that `pcoll_buffers` is keyed with 
`bytes`.
   

----------------------------------------------------------------
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: 159296)
    Time Spent: 1h 10m  (was: 1h)

> Side inputs don't work on Python 3 
> -----------------------------------
>
>                 Key: BEAM-5617
>                 URL: https://issues.apache.org/jira/browse/BEAM-5617
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Robert Bradshaw
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> ======================================================================
> ERROR: test_iterable_side_input 
> (apache_beam.transforms.sideinputs_test.SideInputsTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 677, in process
>     self.do_fn_invoker.invoke_process(windowed_value)
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 414, in invoke_process
>     windowed_value, self.process_method(windowed_value.value))
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/core.py",
>  line 1068, in <lambda>
>     wrapper = lambda x: [fn(x)]
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/testing/util.py",
>  line 119, in _equal
>     'Failed assert: %r == %r' % (sorted_expected, sorted_actual))
> apache_beam.testing.util.BeamAssertException: Failed assert: [3, 4, 6, 8] == 
> []



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

Reply via email to