Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.23.10, 2.1.1-beta, 3.0.0-alpha1
-
None
Description
This bug was discovered by Casey Ching.
The command dfs -put /foo/hello.txt dir is supposed to create dir/hello.txt on HDFS. It doesn't work right if "dir" has a space in it:
[adi@haus01 ~]$ hdfs dfs -mkdir 'space cat' [adi@haus01 ~]$ hdfs dfs -put /etc/motd 'space cat' [adi@haus01 ~]$ hdfs dfs -cat 'space cat/motd' cat: `space cat/motd': No such file or directory [adi@haus01 ~]$ hdfs dfs -ls space\* Found 1 items -rw-r--r-- 2 adi supergroup 251 2012-12-20 11:16 space%2520cat/motd [adi@haus01 ~]$ hdfs dfs -cat 'space%20cat/motd' Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-30-generic x86_64) ...
Note that the dfs -ls output wrongly encodes the wrongly encoded directory name, turning %20 into %2520. It does the same thing with space:
[adi@haus01 ~]$ hdfs dfs -touchz 'space cat/foo' [adi@haus01 ~]$ hdfs dfs -ls 'space cat' Found 1 items -rw-r--r-- 2 adi supergroup 0 2012-12-20 11:36 space%20cat/foo
Attachments
Attachments
Issue Links
- is duplicated by
-
HADOOP-10272 Hadoop 2 "-copyFromLocal" fail when source is a folder and there are spaces in the path
- Resolved