[ 
https://issues.apache.org/jira/browse/HDFS-14925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16958990#comment-16958990
 ] 

Junwang Zhao commented on HDFS-14925:
-------------------------------------

[~sodonnell] thanks for your reply.
{code:java}
hadoop fs -mv /project/folder/test /other_project/folder/
{code}
⬆️ will not be denied, what should be denied is ⬇️:
{code:java}
hadoop fs -mv /project /other_project/folder
{code}
because /project is snapshot root.

In your case, because /project has snapshot so the validateRenameSource already 
make sure this will be denied,

what i'm fixing is that if /project does'nt have snapshot, but it is 
snapshottable, the mv operation won't be denied.

 

To make it more clear, you can try the following:
{code:java}
hdfs dfs -mkdir /dir1
hdfs dfs -mkdir /dir2
hdfs dfsadmin -allowSnapshot /dir1
hdfs dfsadmin -allowSnapshot /dir2
hdfs dfs -createSnapshot /dir1 snap1
hdfs dfs -mv /dir2 /dir1/
hdfs dfs -createSnapshot /dir1/dir2 snap2{code}
Which will cause nested snapshot.

> rename operation should check nest snapshot
> -------------------------------------------
>
>                 Key: HDFS-14925
>                 URL: https://issues.apache.org/jira/browse/HDFS-14925
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Junwang Zhao
>            Priority: Major
>
> When we do rename operation, If the src directory or any of its descendant
> is snapshottable and the dst directory or any of its ancestors is 
> snapshottable, 
> we consider this as nested snapshot, which should be denied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to