You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2015/12/05 01:34:11 UTC

[jira] [Updated] (MAPREDUCE-6564) distcp creates missing perent directories which is inconsistent with fs -cp

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

Tsz Wo Nicholas Sze updated MAPREDUCE-6564:
-------------------------------------------
    Description: 
fs -cp will fail if the destination parent directory does not exist.
{code}
$hadoop fs -cp /a.sh /dst/non-existing/a.sh
cp: `/dst/non-existing/a.sh': No such file or directory
{code}
However, distcp will not fail.  It creates the missing parent directory.
{code}
$hadoop distcp /a.sh /dst/non-existing/a.sh
...
$hadoop fs -ls /dst/non-existing
Found 1 items
-rw-r--r--   3 szetszwo hdfs        531 2015-12-04 16:24 /dst/non-existing/a.sh
{code}


  was:
fs -cp will fail if the destination parent directory does not exist.
{code}
$hadoop fs -cp /a.sh /dst/non-existing/a.sh
cp: `/dst/non-existing/a.sh': No such file or directory
{code}
However, distcp will not fail.  It creates it
{code}
$hadoop distcp /a.sh /dst/non-existing/a.sh
...
$hadoop fs -ls /dst/non-existing
Found 1 items
-rw-r--r--   3 szetszwo hdfs        531 2015-12-04 16:24 /dst/non-existing/a.sh
{code}



> distcp creates missing perent directories which is inconsistent with fs -cp
> ---------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6564
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: distcp
>            Reporter: Tsz Wo Nicholas Sze
>
> fs -cp will fail if the destination parent directory does not exist.
> {code}
> $hadoop fs -cp /a.sh /dst/non-existing/a.sh
> cp: `/dst/non-existing/a.sh': No such file or directory
> {code}
> However, distcp will not fail.  It creates the missing parent directory.
> {code}
> $hadoop distcp /a.sh /dst/non-existing/a.sh
> ...
> $hadoop fs -ls /dst/non-existing
> Found 1 items
> -rw-r--r--   3 szetszwo hdfs        531 2015-12-04 16:24 /dst/non-existing/a.sh
> {code}



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