[
https://issues.apache.org/jira/browse/BEAM-5428?focusedWorklogId=319746&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-319746
]
ASF GitHub Bot logged work on BEAM-5428:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Sep/19 18:44
Start Date: 27/Sep/19 18:44
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #9418: [BEAM-5428]
Implement cross-bundle user state caching in the Python SDK
URL: https://github.com/apache/beam/pull/9418#discussion_r329194247
##########
File path: sdks/python/apache_beam/runners/worker/bundle_processor.py
##########
@@ -370,17 +365,20 @@ def clear(self):
self._added_elements = []
def _commit(self):
+ to_await = None
if self._cleared:
- self._state_handler.blocking_clear(self._state_key)
+ to_await = self._state_handler.clear(self._state_key, is_cached=True)
if self._added_elements:
- value_coder_impl = self._value_coder.get_impl()
- out = coder_impl.create_OutputStream()
- for element in self._added_elements:
- value_coder_impl.encode_to_stream(element, out, True)
- self._state_handler.blocking_append(self._state_key, out.get())
+ to_await = self._state_handler.append(
Review comment:
Just a thought: I wonder if append should be renamed extend (analogous to
list.append vs list.extend) as we're concatenating multiple elements here now.
----------------------------------------------------------------
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: 319746)
Time Spent: 25h 40m (was: 25.5h)
> Implement cross-bundle state caching.
> -------------------------------------
>
> Key: BEAM-5428
> URL: https://issues.apache.org/jira/browse/BEAM-5428
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-harness
> Reporter: Robert Bradshaw
> Assignee: Maximilian Michels
> Priority: Major
> Time Spent: 25h 40m
> Remaining Estimate: 0h
>
> Tech spec:
> [https://docs.google.com/document/d/1BOozW0bzBuz4oHJEuZNDOHdzaV5Y56ix58Ozrqm2jFg/edit#heading=h.7ghoih5aig5m]
> Relevant document:
> [https://docs.google.com/document/d/1ltVqIW0XxUXI6grp17TgeyIybk3-nDF8a0-Nqw-s9mY/edit#|https://docs.google.com/document/d/1ltVqIW0XxUXI6grp17TgeyIybk3-nDF8a0-Nqw-s9mY/edit]
> Mailing list link:
> [https://lists.apache.org/thread.html/caa8d9bc6ca871d13de2c5e6ba07fdc76f85d26497d95d90893aa1f6@%3Cdev.beam.apache.org%3E]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)