[ 
https://issues.apache.org/jira/browse/BEAM-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kenneth Knowles updated BEAM-1281:
----------------------------------
    Description: 
Because the GlobalWindow is encoded to zero bytes, a StateNamespace built from 
the window has a stringKey "//" while the global namespace's stringKey is "/". 
As paths, these are identical, though we don't currently treat them as paths, 
quite. It isn't clear whether this is desirable. Maybe it is harmless but it 
complicates parsing and interpretation.

For a system that actually builds hierarchical paths out of, say, some prefix, 
the StateNamespace, and a subsequent ID, the canonicalized path is the same so 
it is not possible to deserialize to the original.

There are other gotchas associated with zero-length encodings, such as APIs 
that return zero bytes when there is no more data ready, versus returning zero 
bytes because the data is representable in zero bytes, given the context of 
knowing what type of data is expected.

  was:
Because the GlobalWindow is encoded to zero bytes, a StateNamespace built from 
the window has a stringKey "//" while the global namespace's stringKey is "/". 
As paths, these are identical, though we don't currently treat them as paths, 
quite. It isn't clear whether this is desirable. Maybe it is harmless but it 
complicates parsing and interpretation.

For a system that actually builds hierarchical paths out of, say, some prefix, 
the StateNamespace, and a subsequent ID, the canonicalized path is the same so 
it is not possible to deserialize to the original.


> GlobalWindow needs non-empty encoding in nested context
> -------------------------------------------------------
>
>                 Key: BEAM-1281
>                 URL: https://issues.apache.org/jira/browse/BEAM-1281
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Minor
>
> Because the GlobalWindow is encoded to zero bytes, a StateNamespace built 
> from the window has a stringKey "//" while the global namespace's stringKey 
> is "/". As paths, these are identical, though we don't currently treat them 
> as paths, quite. It isn't clear whether this is desirable. Maybe it is 
> harmless but it complicates parsing and interpretation.
> For a system that actually builds hierarchical paths out of, say, some 
> prefix, the StateNamespace, and a subsequent ID, the canonicalized path is 
> the same so it is not possible to deserialize to the original.
> There are other gotchas associated with zero-length encodings, such as APIs 
> that return zero bytes when there is no more data ready, versus returning 
> zero bytes because the data is representable in zero bytes, given the context 
> of knowing what type of data is expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to