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

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.19.0
    • None
    • None
    • Reviewed
    • 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 Sze
        2. 3939_20080825b.patch
          10 kB
          Tsz-wo Sze
        3. 3939_20080826.patch
          10 kB
          Tsz-wo Sze
        4. 3939_20080828.patch
          11 kB
          Tsz-wo Sze
        5. 3939_20080829.patch
          11 kB
          Tsz-wo Sze
        6. 3939_20080829b_0.18+3873_20080811b_0.18.patch
          39 kB
          Tsz-wo Sze
        7. 3939_20080829b.patch
          11 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: