From f32ffc750a3107a9b9b60eda8855973f00ec1de9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 19 Mar 2010 23:52:51 +0000 Subject: [PATCH] HADOOP-6593. TextRecordInputStream doesn't close SequenceFile.Reader. Contributed by Chase Bradford. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@925487 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/fs/FsShell.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9f4a05d9085..5e18b865057 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -284,6 +284,9 @@ Trunk (unreleased changes) HADOOP-6546. BloomMapFile can return false negatives. (Clark Jefcoat via tomwhite) + HADOOP-6593. TextRecordInputStream doesn't close SequenceFile.Reader. + (Chase Bradford via tomwhite) + Release 0.21.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/java/org/apache/hadoop/fs/FsShell.java b/src/java/org/apache/hadoop/fs/FsShell.java index 91fc0b7a8fe..73767f7031b 100644 --- a/src/java/org/apache/hadoop/fs/FsShell.java +++ b/src/java/org/apache/hadoop/fs/FsShell.java @@ -393,6 +393,11 @@ public class FsShell extends Configured implements Tool { } return ret; } + + public void close() throws IOException { + r.close(); + super.close(); + } } private InputStream forMagic(Path p, FileSystem srcFs) throws IOException {