[
https://issues.apache.org/jira/browse/BEAM-7516?focusedWorklogId=376029&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-376029
]
ASF GitHub Bot logged work on BEAM-7516:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Jan/20 01:28
Start Date: 23/Jan/20 01:28
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #10291:
[BEAM-7516][BEAM-8823] FnApiRunner works with work queues, and a primitive
watermark manager
URL: https://github.com/apache/beam/pull/10291#discussion_r369892409
##########
File path:
sdks/python/apache_beam/runners/portability/fn_api_runner_execution.py
##########
@@ -0,0 +1,697 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Set of utilities for execution of a pipeline by the FnApiRunner."""
+
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+from typing import TYPE_CHECKING
+from typing import Iterator
+from typing import List
+
+from apache_beam import coders
+from apache_beam.coders.coder_impl import create_InputStream
+from apache_beam.coders.coder_impl import create_OutputStream
+from apache_beam.portability import common_urns
+from apache_beam.portability.api import beam_fn_api_pb2
+from apache_beam.portability.api import beam_runner_api_pb2
+from apache_beam.runners.portability.fn_api_runner_transforms import
IMPULSE_BUFFER
+from apache_beam.runners.portability.fn_api_runner_transforms import
PAR_DO_URNS
+from apache_beam.runners.portability.fn_api_runner_transforms import
create_buffer_id
+from apache_beam.runners.portability.fn_api_runner_transforms import
only_element
+from apache_beam.runners.portability.fn_api_runner_transforms import
split_buffer_id
+from apache_beam.runners.portability.fn_api_runner_transforms import
unique_name
+from apache_beam.runners.worker import bundle_processor
+from apache_beam.transforms import trigger
+from apache_beam.transforms.window import GlobalWindow
+from apache_beam.transforms.window import GlobalWindows
+from apache_beam.utils import proto_utils
+from apache_beam.utils import timestamp
+from apache_beam.utils import windowed_value
+
+if TYPE_CHECKING:
+ from apache_beam.transforms.window import BoundedWindow # pylint:
disable=ungrouped-imports
+
+
+# TODO(pabloem): Add Pydoc to methods in this file.
+
+class _ListBuffer(list):
+ """Used to support parititioning of a list."""
+ def partition(self, n):
+ # type: (int) -> List[List[bytes]]
+ return [self[k::n] for k in range(n)]
+
+
+class _GroupingBuffer(object):
Review comment:
Should these all extend from some common baseclass?
----------------------------------------------------------------
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: 376029)
Time Spent: 6h (was: 5h 50m)
> Add a watermark manager for the fn_api_runner
> ---------------------------------------------
>
> Key: BEAM-7516
> URL: https://issues.apache.org/jira/browse/BEAM-7516
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Pablo Estrada
> Assignee: Pablo Estrada
> Priority: Major
> Time Spent: 6h
> Remaining Estimate: 0h
>
> To track watermarks for each stage
--
This message was sent by Atlassian Jira
(v8.3.4#803005)