[jira] [Commented] (AVRO-2136) All Outstreams are not getting closed in DataFileWriter

2019-03-07 Thread Ivan Greene (JIRA)


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

Ivan Greene commented on AVRO-2136:
---

I agree this issue can be closed. It is not obvious but in DataFileWriter#init, 
'underlyingStream' is assigned to the OutputStream and 'out' is assigned to a 
BufferedFileOutputStream wrapping the OutputStream; when 'out' is closed, the 
original outputstream will also be closed.

> All Outstreams are not getting closed in DataFileWriter
> ---
>
> Key: AVRO-2136
> URL: https://issues.apache.org/jira/browse/AVRO-2136
> Project: Apache Avro
>  Issue Type: Bug
>  Components: java
>Reporter: Balu
>Priority: Critical
>
> underlyingStream is getting initialized with output stream provided while 
> writing the data, butis never getting closed. This is causing issue when a 
> file system accepts only one active connection to write the data.
>  
> When close method is called it is also close underlyingStream



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2136) All Outstreams are not getting closed in DataFileWriter

2018-12-21 Thread Martin Jubelgas (JIRA)


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

Martin Jubelgas commented on AVRO-2136:
---

I'm not quite sure what you mean. On first sight, this sounds similar to 
AVRO-2286, but actually, since it's not the constructor that's throwing an 
exception here, all underlying streams that need to be closed will be closed by 
calling the close method.

There should be no leaking of file descriptors or output streams possible when 
using
{code:java}
try ( DataFileWriter writer = new DataFileWriter<>( schema ) ) {
  writer.create( file ); // or witer.append( oldFile );
  writer.append( data );
}
{code}
Could you provide a test case for the problem you describe? Otherwise, I think 
we should close this issue.

> All Outstreams are not getting closed in DataFileWriter
> ---
>
> Key: AVRO-2136
> URL: https://issues.apache.org/jira/browse/AVRO-2136
> Project: Apache Avro
>  Issue Type: Bug
>  Components: java
>Reporter: Balu
>Priority: Critical
>
> underlyingStream is getting initialized with output stream provided while 
> writing the data, butis never getting closed. This is causing issue when a 
> file system accepts only one active connection to write the data.
>  
> When close method is called it is also close underlyingStream



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)