[ http://issues.apache.org/jira/browse/HADOOP-628?page=all ]
Doug Cutting updated HADOOP-628:
--------------------------------
Status: Open (was: Patch Available)
I like that this patch uses a common loop for copying, but it loses the
early-exit feature that 'cat' had. I think copyBytes should check for the
error status if the output is a PrintStream. Perhaps something like:
PrintStream ps = out instanceof PrintStream ? (PrintStream)out : null;
...
while (...) {
out.write(...);
if (ps != null && ps.checkError()) {
throw new IOException(...);
...
}
}
This means that, when output is piped into another program and that program
exits, the 'cat' or 'get' will exit too. So things like 'bin/hadoop fs -cat
foo | head' will execute quickly.
> hadoop hdfs -cat replaces some characters with question marks.
> ----------------------------------------------------------------
>
> Key: HADOOP-628
> URL: http://issues.apache.org/jira/browse/HADOOP-628
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: arkady borkovsky
> Assigned To: Wendy Chien
> Attachments: hadoop-628.patch
>
>
> Should not the effect of
> hadoop hdfs -get path local-file
> and
> hadoop hdfs -cat path >local-file
> be the same?
> Try to do this with a (hdfs) file that contains non-ascii characters and do a
> diff.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira