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

Yongjun Zhang commented on HDFS-9123:
-------------------------------------

Hello [~liuml07],

Thanks for the comments.

{quote}
This is a good point. I supposed this is the case for distcp instead of cp?
{quote}
it's for "fs-cp", not distcp here. It also supports copying to different file 
systems.

Hi [~jojochuang],

Thanks for the new rev. 

Would you please address comment # 1 at 
https://issues.apache.org/jira/browse/HDFS-9123?focusedCommentId=14904029&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14904029
?
About my comment #2, I studied the code a bit, and found that FsShell simply 
absort all exceptions, and return status code, the client code has no way to 
tell what's the exact failure reason if a command failed. So I'm ok that 
comment #2 is not addressed. At least, the new test can show that copying from 
root to child fail the same way as copying from any parent to child.

Thanks.


> Copying from the root to a subdirectory should be forbidden
> -----------------------------------------------------------
>
>                 Key: HDFS-9123
>                 URL: https://issues.apache.org/jira/browse/HDFS-9123
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fs
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Minor
>         Attachments: HDFS-9123.001.patch, HDFS-9123.002.patch, 
> HDFS-9123.003.patch
>
>
> HDFS forbids copying from a directory to its subdirectory (e.g. hdfs dfs -cp 
> /abc /abc/xyz) as otherwise it could cause infinite copying (/abc/xyz/xyz, 
> /abc/xyz/xyz, /abc/xyz/xyz/xyz,... etc)
> However, the existing path validation fails if the source path is the root, 
> causing infinite copying, until the disk space is filled up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to