[ 
https://issues.apache.org/jira/browse/BEAM-12072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311708#comment-17311708
 ] 

Brian Hulette commented on BEAM-12072:
--------------------------------------

Note WriteToFiles is a public API, and using it in this mode should work fine 
for global windows. Perhaps we should update WriteToFiles to raise when it's 
given a concrete FileSink and non-global windows.

> WriteToFiles with a concrete sink can shunt data to a single window
> -------------------------------------------------------------------
>
>                 Key: BEAM-12072
>                 URL: https://issues.apache.org/jira/browse/BEAM-12072
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Priority: P2
>
> When given a concrete `FileSink`, `WriteToFiles` will re-use the same sink 
> across windows: 
> - 
> https://github.com/apache/beam/blob/e92d184abc79fe84c48de3dfd9dd168d9b38feac/sdks/python/apache_beam/io/fileio.py#L461
> - 
> https://github.com/apache/beam/blob/e92d184abc79fe84c48de3dfd9dd168d9b38feac/sdks/python/apache_beam/io/fileio.py#L625
> This can lead to data for one window being written to the sink for another 
> window.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to