From 61bf9f779919206296d2ce84a8a6b2d912709a59 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 20 Jun 2014 18:36:11 +0000 Subject: [PATCH] HADOOP-10690. Lack of synchronization on access to InputStream in NativeAzureFileSystem#NativeAzureFsInputStream#close(). Contributed by Chen He. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1604236 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 4 ++++ .../org/apache/hadoop/fs/azure/NativeAzureFileSystem.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 528f5e5a25..3adee445e5 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -588,6 +588,10 @@ Release 2.5.0 - UNRELEASED HADOOP-10689. InputStream is not closed in AzureNativeFileSystemStore#retrieve(). (Chen He via cnauroth) + HADOOP-10690. Lack of synchronization on access to InputStream in + NativeAzureFileSystem#NativeAzureFsInputStream#close(). + (Chen He via cnauroth) + BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS HADOOP-10520. Extended attributes definition and FileSystem APIs for diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java index 30e6b3091e..87dc9787f0 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java @@ -193,7 +193,7 @@ public synchronized int read(byte[] b, int off, int len) throws IOException { } @Override - public void close() throws IOException { + public synchronized void close() throws IOException { in.close(); }