Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15982

Deleted data using HTTP API should be saved to the trash

    XMLWordPrintableJSON

Details

    • Incompatible change
    • Hide
      Incompatible change:

      Webhdfs and httpfs DELETE API's default behaviour is going to be similar to Delete shell command. If config "fs.trash.interval" is set to value greater than 0, DELETE API will by-default try to move given file to .Trash dir (similar to Delete shell command's behaviour).
      However, DELETE API will also have skiptrash query param available that can skip trash even if config "fs.trash.interval" is set to value greater than 0 (similar to skipTrash argument of Delete shell command).
      Default value of skiptrash query param will be false.

      API change:
      curl -i -X DELETE "http://host:port/webhdfs/v1/path?op=DELETE [&recursive=true|false][&skiptrash=true|false]"
      Show
      Incompatible change: Webhdfs and httpfs DELETE API's default behaviour is going to be similar to Delete shell command. If config "fs.trash.interval" is set to value greater than 0, DELETE API will by-default try to move given file to .Trash dir (similar to Delete shell command's behaviour). However, DELETE API will also have skiptrash query param available that can skip trash even if config "fs.trash.interval" is set to value greater than 0 (similar to skipTrash argument of Delete shell command). Default value of skiptrash query param will be false. API change: curl -i -X DELETE " http://host:port/webhdfs/v1/path?op=DELETE [&recursive=true|false][&skiptrash=true|false]"

    Description

      If we delete the data from the Web UI then it should be first moved to configured/default Trash directory and after the trash interval time, it should be removed. currently, data directly removed from the system[This behavior should be the same as CLI cmd]

      This can be helpful when the user accidentally deletes data from the Web UI.

      Similarly we should provide "Skip Trash" option in HTTP API as well which should be accessible through Web UI.

      Attachments

        1. Screenshot 2021-04-23 at 4.19.42 PM.png
          212 kB
          Viraj Jasani
        2. Screenshot 2021-04-23 at 4.36.57 PM.png
          168 kB
          Viraj Jasani

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bpatel Bhavik Patel
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 13.5h
                  13.5h