hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10690) Lack of synchronization on access to InputStream in NativeAzureFileSystem#NativeAzureFsInputStream#close()
Date Mon, 16 Jun 2014 21:40:01 GMT

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

Chris Nauroth commented on HADOOP-10690:
----------------------------------------

The equivalent class in the HDFS client is {{DFSInputStream}}, and it has a {{close}} method
that is synchronized.  I don't know that lack of synchronized here is causing any specific
problems, but I suppose we ought to add it for maximum compatibility with HDFS semantics.

The underlying class that ends up getting used from the Azure SDK is {{BlobInputStream}}.
 Reading its source, it looks like that class has a synchronized {{close}}.  Even though it's
synchronized at that layer, we might as well go ahead and add it here too.

> Lack of synchronization on access to InputStream in NativeAzureFileSystem#NativeAzureFsInputStream#close()
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-10690
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10690
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>     public void close() throws IOException {
>       in.close();
>     }
> {code}
> The close() method should be protected by synchronized keyword.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message