From 8300b9fb385b47672d98ea62ab291991424f3cce Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 20 Jun 2014 18:30:49 +0000 Subject: [PATCH] HADOOP-10689. InputStream is not closed in AzureNativeFileSystemStore#retrieve(). Contributed by Chen He. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1604233 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index fe80214f79..528f5e5a25 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -585,6 +585,9 @@ Release 2.5.0 - UNRELEASED HADOOP-9559. When metrics system is restarted MBean names get incorrectly flagged as dupes. (Mostafa Elhemali and Mike Liddell via cnauroth) + HADOOP-10689. InputStream is not closed in + AzureNativeFileSystemStore#retrieve(). (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/AzureNativeFileSystemStore.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java index 9dcaddc231..c5b9afe6d8 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java @@ -1723,7 +1723,7 @@ public DataInputStream retrieve(String key, long startByteOffset) inDataStream.close(); } if(in != null){ - inDataStream.close(); + in.close(); } throw e; }