You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2009/10/17 00:41:55 UTC
svn commit: r826120 - in /hadoop/common/trunk: CHANGES.txt
src/java/org/apache/hadoop/fs/FsShell.java
Author: cdouglas
Date: Fri Oct 16 22:41:54 2009
New Revision: 826120
URL: http://svn.apache.org/viewvc?rev=826120&view=rev
Log:
HADOOP-6293. Fix FsShell -text to work on filesystems other than the default.
Modified:
hadoop/common/trunk/CHANGES.txt
hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java
Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=826120&r1=826119&r2=826120&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Fri Oct 16 22:41:54 2009
@@ -30,7 +30,10 @@
OPTIMIZATIONS
BUG FIXES
-
+
+ HADOOP-6293. Fix FsShell -text to work on filesystems other than the
+ default. (cdouglas)
+
Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java?rev=826120&r1=826119&r2=826120&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java Fri Oct 16 22:41:54 2009
@@ -367,11 +367,13 @@
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();
}