Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-6055 Offline Snapshots in HBase 0.96
  3. HBASE-7365

Safer table creation and deletion using .tmp dir

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.95.0
    • master
    • None
    • Reviewed

    Description

      Currently tables are created in the root directory, and the removal works on the root directory.
      Change the code to use a /hbase/.tmp directory to make the creation and removal a bit safer

      Table Creation steps

      • Create the table descriptor (table folder, in /hbase/.tmp/)
      • Create the table regions (always in temp)
      • Move the table from temp to the root folder
      • Add the regions to meta
      • Trigger assignment
      • Set enable flag in ZooKeeper

      Table Deletion steps

      • Wait for regions in transition
      • Remove regions from meta (use bulk delete)
      • Move the table in /hbase/.tmp
      • Remove the table from the descriptor cache
      • Remove table from zookeeper
      • Archive the table

      The main changes in the current code are:

      • Writing to /hbase/.tmp and then rename
      • using bulk delete in DeletionTableHandler

      Attachments

        1. 7365-v4.patch
          23 kB
          Ted Yu
        2. HBASE-7365-v3.patch
          24 kB
          Matteo Bertozzi
        3. HBASE-7365-v2.patch
          24 kB
          Matteo Bertozzi
        4. HBASE-7365-v1.patch
          24 kB
          Matteo Bertozzi
        5. HBASE-7365-v0.patch
          21 kB
          Matteo Bertozzi

        Issue Links

          Activity

            People

              mbertozzi Matteo Bertozzi
              mbertozzi Matteo Bertozzi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: