diff --git a/CHANGES.txt b/CHANGES.txt index 7ca53e6d640..19685a38139 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,7 +30,10 @@ Trunk (unreleased changes) OPTIMIZATIONS BUG FIXES - + + HADOOP-6293. Fix FsShell -text to work on filesystems other than the + default. (cdouglas) + 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 9676c7b494f..6f7d6b059ee 100644 --- a/src/java/org/apache/hadoop/fs/FsShell.java +++ b/src/java/org/apache/hadoop/fs/FsShell.java @@ -367,11 +367,13 @@ public class FsShell extends Configured implements Tool { DataOutputBuffer outbuf; public TextRecordInputStream(FileStatus f) throws IOException { - r = new SequenceFile.Reader(fs, f.getPath(), getConf()); - key = ReflectionUtils.newInstance(r.getKeyClass().asSubclass(WritableComparable.class), - getConf()); - val = ReflectionUtils.newInstance(r.getValueClass().asSubclass(Writable.class), - getConf()); + final Path fpath = f.getPath(); + final Configuration lconf = getConf(); + r = new SequenceFile.Reader(fpath.getFileSystem(lconf), fpath, lconf); + key = ReflectionUtils.newInstance( + r.getKeyClass().asSubclass(WritableComparable.class), lconf); + val = ReflectionUtils.newInstance( + r.getValueClass().asSubclass(Writable.class), lconf); inbuf = new DataInputBuffer(); outbuf = new DataOutputBuffer(); }