[ 
https://issues.apache.org/jira/browse/HADOOP-6145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakob Homan updated HADOOP-6145:
--------------------------------

    Attachment: COMMON-6145.patch

Attaching patch for trunk.
Problem was the trash method was throwing FileNotFound, which was not being 
handled.  There are three different places where the non-existence of the file 
being deleted could conceivably be handled.  Fixed by just checking for the 
file's existence at the beginning and exiting if not found.

No unit test because the affected unit test is TestHDFSCLI, which is in HDFS 
project.  Manually tested and it works.  The reason this wasn't detected 
previously is that it only manifests itself when the trash feature is enabled, 
which apparently it isn't on the minidfscluster that powers TestCLI.  We should 
probably looking at running Test*CLI with both trash on and trash off.

> No error message for deleting non-existant file or directory.
> -------------------------------------------------------------
>
>                 Key: HADOOP-6145
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6145
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.20.1
>            Reporter: Suman Sehgal
>            Assignee: Jakob Homan
>         Attachments: COMMON-6145.patch, HADOOP-6145.patch
>
>
> If non-existant path or src is provided with rm/rmr option then no error 
> message is displayed 
> command: hadoop dfs -rm <src>  (where src is non-existant)
> dfs displays "rm:  <src>"
> while it should display "No such file or directory".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to