Hadoop Common
  1. Hadoop Common
  2. HADOOP-3939

DistCp should support an option for deleting non-existing files.

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.19.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Added a new option -delete to DistCp so that if the files/directories exist in dst but not in src will be deleted. It uses FsShell to do delete, so that it will use trash if the trash is enable.

      Description

      One use case of DistCp is to sync two directories. Currently, DistCp has an -update option for overwriting dst files if src is different from dst. However, it is not enough for sync. If there are some files in dst but not exist in src, there is no easy way to delete them. We should add a new option, say -delete, so that DistCp will delete the non-existing in dst.

      1. 3939_20080829b_0.18+3873_20080811b_0.18.patch
        39 kB
        Tsz Wo Nicholas Sze
      2. 3939_20080829b.patch
        11 kB
        Tsz Wo Nicholas Sze
      3. 3939_20080829.patch
        11 kB
        Tsz Wo Nicholas Sze
      4. 3939_20080828.patch
        11 kB
        Tsz Wo Nicholas Sze
      5. 3939_20080826.patch
        10 kB
        Tsz Wo Nicholas Sze
      6. 3939_20080825b.patch
        10 kB
        Tsz Wo Nicholas Sze
      7. 3939_20080825.patch
        6 kB
        Tsz Wo Nicholas Sze

        Issue Links

          Activity

          Tsz Wo Nicholas Sze created issue -
          Tsz Wo Nicholas Sze made changes -
          Field Original Value New Value
          Link This issue is related to HADOOP-3873 [ HADOOP-3873 ]
          Tsz Wo Nicholas Sze made changes -
          Link This issue blocks HADOOP-3942 [ HADOOP-3942 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080825.patch [ 12388879 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080825b.patch [ 12388890 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080826.patch [ 12388941 ]
          Tsz Wo Nicholas Sze made changes -
          Release Note Added a new optopm -delete to DistCp so that if the files/directories exist in dst but not in src will be deleted. It uses FsShell to do delete, so that it will use trash if the trash is enable.
          Assignee Tsz Wo (Nicholas), SZE [ szetszwo ]
          Status Open [ 1 ] Patch Available [ 10002 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080828.patch [ 12389133 ]
          Chris Douglas made changes -
          Hadoop Flags [Reviewed]
          Fix Version/s 0.19.0 [ 12313211 ]
          Tsz Wo Nicholas Sze made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Tsz Wo Nicholas Sze made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080829.patch [ 12389184 ]
          Tsz Wo Nicholas Sze made changes -
          Attachment 3939_20080829b.patch [ 12389205 ]
          Tsz Wo Nicholas Sze made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Tsz Wo Nicholas Sze made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Chris Douglas made changes -
          Resolution Fixed [ 1 ]
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Tsz Wo Nicholas Sze made changes -
          Release Note Added a new optopm -delete to DistCp so that if the files/directories exist in dst but not in src will be deleted. It uses FsShell to do delete, so that it will use trash if the trash is enable. Added a new option -delete to DistCp so that if the files/directories exist in dst but not in src will be deleted. It uses FsShell to do delete, so that it will use trash if the trash is enable.
          Nigel Daley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Tsz Wo Nicholas Sze made changes -
          Tsz Wo Nicholas Sze made changes -
          Link This issue is related to HADOOP-5227 [ HADOOP-5227 ]
          Owen O'Malley made changes -
          Component/s tools/distcp [ 12312387 ]
          Benoit Sigoure made changes -
          Hadoop Flags Reviewed [ 10343 ] Incompatible change,Reviewed [ 10342,10343 ]
          Benoit Sigoure made changes -
          Hadoop Flags Reviewed,Incompatible change [ 10343,10342 ] Reviewed [ 10343 ]
          Gavin made changes -
          Link This issue blocks HADOOP-3942 [ HADOOP-3942 ]
          Gavin made changes -
          Link This issue is depended upon by HADOOP-3942 [ HADOOP-3942 ]

            People

            • Assignee:
              Tsz Wo Nicholas Sze
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development