HADOOP-6293. Fix FsShell -text to work on filesystems other than the default.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@826120 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e9ba35841
commit
c5bce7be47
@ -31,6 +31,9 @@ Trunk (unreleased changes)
|
|||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
HADOOP-6293. Fix FsShell -text to work on filesystems other than the
|
||||||
|
default. (cdouglas)
|
||||||
|
|
||||||
Release 0.21.0 - Unreleased
|
Release 0.21.0 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -367,11 +367,13 @@ private class TextRecordInputStream extends InputStream {
|
|||||||
DataOutputBuffer outbuf;
|
DataOutputBuffer outbuf;
|
||||||
|
|
||||||
public TextRecordInputStream(FileStatus f) throws IOException {
|
public TextRecordInputStream(FileStatus f) throws IOException {
|
||||||
r = new SequenceFile.Reader(fs, f.getPath(), getConf());
|
final Path fpath = f.getPath();
|
||||||
key = ReflectionUtils.newInstance(r.getKeyClass().asSubclass(WritableComparable.class),
|
final Configuration lconf = getConf();
|
||||||
getConf());
|
r = new SequenceFile.Reader(fpath.getFileSystem(lconf), fpath, lconf);
|
||||||
val = ReflectionUtils.newInstance(r.getValueClass().asSubclass(Writable.class),
|
key = ReflectionUtils.newInstance(
|
||||||
getConf());
|
r.getKeyClass().asSubclass(WritableComparable.class), lconf);
|
||||||
|
val = ReflectionUtils.newInstance(
|
||||||
|
r.getValueClass().asSubclass(Writable.class), lconf);
|
||||||
inbuf = new DataInputBuffer();
|
inbuf = new DataInputBuffer();
|
||||||
outbuf = new DataOutputBuffer();
|
outbuf = new DataOutputBuffer();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user