Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-3939

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: