tangshangwen created HDFS-9614:
----------------------------------
Summary: If the path contains '\ t' character, can not be deleted
from the command line
Key: HDFS-9614
URL: https://issues.apache.org/jira/browse/HDFS-9614
Project: Hadoop HDFS
Issue Type: Bug
Affects Versions: 2.7.1, 2.2.0
Reporter: tangshangwen
Assignee: tangshangwen
In our cluster, I found that some users create directory contains '\ t'
character, cause we can not be deleted from the command line. for example
{code:title=Test.java|borderStyle=solid}
try {
FileSystem fs = FileSystem.get(new Configuration());
fs.mkdirs(new Path("/user/hadoop/tangshangwen\r"));
IOUtils.closeQuietly(fs);
} catch (IOException e) {
e.printStackTrace();
}
{code}
Then we delete
{noformat}
$ hdfs dfs -ls /user/hadoop/
Found 4 items
drwx------ - hadoop supergroup 0 2016-01-05 11:49 /user/hadoop/.Trash
drwx------ - hadoop supergroup 0 2016-01-05 12:04
/user/hadoop/.staging
drwxr-xr-x - hadoop supergroup 0 2016-01-05 12:42
/user/hadoop/DistributedShell
drwxr-xr-x - hadoop supergroup 0 2016-01-05 15:46
/user/hadoop/tangshangwen
$ hdfs dfs -rm -R /user/hadoop/tangshang*
rm: `/user/hadoop/tangshang*': No such file or directory
$ hdfs dfs -ls /user/hadoop/tangshangwen
ls: `/user/hadoop/tangshangwen': No such file or directory
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)