[
https://issues.apache.org/jira/browse/BEAM-6120?focusedWorklogId=169437&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-169437
]
ASF GitHub Bot logged work on BEAM-6120:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Nov/18 18:31
Start Date: 26/Nov/18 18:31
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #7127:
[BEAM-6120] Support retrieval of large gbk iterables over the state API.
URL: https://github.com/apache/beam/pull/7127#discussion_r236374307
##########
File path: model/pipeline/src/main/proto/beam_runner_api.proto
##########
@@ -588,6 +588,10 @@ message StandardCoders {
// of the element
// Components: The element coder and the window coder, in that order
WINDOWED_VALUE = 8 [(beam_urn) = "beam:coder:windowed_value:v1"];
+
+ // Encodes an iterable of elements, some of which may be stored in state.
+ // Components: Coder for a single element.
+ STATE_BACKED_ITERABLE = 9 [(beam_urn) =
"beam:coder:state_backed_iterable:v1"];
Review comment:
Instead of this being a state backed iterable, I was hoping that this would
be a state backed length prefix coder around any type allowing anything to be
truncated. This could replace the length prefix coder or be a new coder which
is like an extension of the length prefix coder. After the last chunk of data,
the state key is encoded:
Example taken from
https://docs.google.com/document/d/1IGduUqmhWDi_69l9nG8kw73HZ5WI5wOps9Tshl5wpQA/edit#heading=h.j8zpiclux4id
Regular length prefix coder (parameterized to 16 bytes):
```
Length 16 | Data [0, 16) | Length 16 | Data [16, 32) | Length 5 | Data[32,
37)
```
State backed length prefix coder (parameterized to 16 bytes), we use
parameterized length + 1 to signal the state key:
```
Length 16 | Data [0, 16) | Length 16 | Data [16, 32) | Length 17 | State Key
```
We can either use a fixed width state key or any length prefix scheme we
want such as varint.
This would allow us to drop support for values >2gb over the Data API and
allow SDKs to always assume that values are never encoded over multiple data
messages simplifying how decoding is done within Runners and SDKs over the Data
API.
----------------------------------------------------------------
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: 169437)
Time Spent: 40m (was: 0.5h)
> Support retrieval of large gbk iterables over the state API.
> ------------------------------------------------------------
>
> Key: BEAM-6120
> URL: https://issues.apache.org/jira/browse/BEAM-6120
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-harness
> Reporter: Robert Bradshaw
> Assignee: Robert Bradshaw
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)