liuguanghua created HDFS-17760:
----------------------------------

             Summary: Fix MoveToTrash throws ParentNotDirectoryException when 
there is a file inode with the same name  in the trash
                 Key: HDFS-17760
                 URL: https://issues.apache.org/jira/browse/HDFS-17760
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: liuguanghua


Move a dir  to trash , when the trash alreay has a  file inode with the same 
name in dir, it will throw ParentNotDirectoryException.

This can be reproduced by following the steps below:

User test does this:

(1)hdfs dfs -touch /subdir0

(2)hdfs dfs -rmr  /subdir0

    The trash path will be /user/test/.Trash/Current/subdir0

(3) hdfs dfs -mkdir -p /subdir0/subdir1/subdir2

(4)hdfs dfs -rmr   /subdir0/subdir1/subdir2

    The trash path should be 
/user/test/.Trash/Current/subdir0timestamp/subdir1/subdir2 ,rather than thow 
ParentNotDirectoryException

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to