Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-28064

Implement truncate_region command to truncate region directly from FS

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-4, 2.5.6, 4.0.0-alpha-1
    • 2.6.0, 3.0.0-beta-1
    • Admin, shell
    • None

    Description

      One of our users has brought up a use-case where they need to truncate a region to delete data within a specific range. There are two scenarios to consider:

      • In the first scenario, the region boundaries involve a time range defined through pre-splitting, and user is looking to efficiently clean old date data. If HBase can directly truncate the region from the file system and then the user can merge the empty region with adjacent regions to effectively eliminate it which will be more optimized compared to deleting the data using Delete API.
      • In another case, if the HFile for that region becomes corrupted for some reason, user want to get rid of the HFile and reload the entire region to avoid consistency issues and ensure performance.

      we can do this by taking the region offline and taking write lock to avoid the consideration of race conditions involving Region In Transition (RITs), region re-opening, and merge/split scenarios.

      Attachments

        Activity

          People

            vjoshi Vaibhav Joshi
            ankit@apache.org Ankit Singhal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: