[
https://issues.apache.org/jira/browse/HDFS-709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Suresh Srinivas updated HDFS-709:
---------------------------------
Attachment: hdfs-709.1.patch
> What's the expected behavior if renaming directory /a/b to be /a/b/? Could
> you please add a unit test for this?
It depends on what /a/b is.
# if /a/b is directory then rename as it is implemented tries to rename /a/b to
/a/b/b. This fails since dst is a directory or file under src.
# If /a/b is a file, it succeeds under the condition src and dst are the same.
Attached a new patch that adds some comments to make the rename tests with
quota more clear.
> TestDFSShell failure
> --------------------
>
> Key: HDFS-709
> URL: https://issues.apache.org/jira/browse/HDFS-709
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 0.21.0
> Reporter: Suresh Srinivas
> Assignee: Suresh Srinivas
> Fix For: 0.21.0
>
> Attachments: hdfs-709.1.patch, hdfs-709.patch
>
>
> HDFS-677 introduced check in rename to reject rename from src to dst where
> dst starts with src. This results in a bug where rename from /test /testFoo
> fails. Instead of testing dst starts with src, the check should be modified
> so that dst cannot be a directory or a file under src.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.