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

Aviem Zur updated BEAM-1465:
----------------------------
    Description: 
{{FileBasedWriter}} API does not have a natural place to flush/close resources 
opened by the writer.

For example, if you create an {{OutputStream}} in your {{Writer}} using the 
{{FileBasedSink}}'s channel and this {{OutputStream}} buffers outputs, there is 
no natural place to call its {{flush()}} method.

Maybe something like {{finishWrite()}} to match the existing 
{{prepareWrite(WritableByteChannel channel)}} can work.

  was:
{{FileBasedWriter}} API does not have a natural place to flush output streams.

If you create an {{OutputStream}} in your {{Writer}} using the 
{{FileBasedSink}}'s channel and this {{OutputStream}} buffers outputs, there is 
no natural place to call its {{flush()}} method.

Maybe something like {{finishWrite()}} to match the existing 
{{prepareWrite(WritableByteChannel channel)}} can work.


> No natural place to flush outputs in FileBasedWriter
> ----------------------------------------------------
>
>                 Key: BEAM-1465
>                 URL: https://issues.apache.org/jira/browse/BEAM-1465
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Aviem Zur
>            Assignee: Daniel Halperin
>
> {{FileBasedWriter}} API does not have a natural place to flush/close 
> resources opened by the writer.
> For example, if you create an {{OutputStream}} in your {{Writer}} using the 
> {{FileBasedSink}}'s channel and this {{OutputStream}} buffers outputs, there 
> is no natural place to call its {{flush()}} method.
> Maybe something like {{finishWrite()}} to match the existing 
> {{prepareWrite(WritableByteChannel channel)}} can work.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to