Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9118

Support auto-purge for tables, when dropping tables/partitions.

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0
    • 1.2.0
    • Metastore
    • None

    Description

      HIVE-7100 introduced a way to skip the trash directory, when deleting table-data, while dropping tables.
      In HIVE-9083/HIVE-9086, I extended this to work when partitions are dropped.

      Here, I propose a table-parameter ("auto.purge") to set up tables to skip-trash when table/partition data is deleted, without needing to say "PURGE" on the Hive CLI. Apropos, on dropTable() and dropPartition(), table data is deleted directly (and not moved to trash) if the following hold true:

      1. The table is MANAGED.
      2. The deleteData parameter to the HMSC.drop*() methods is true.
      3. Either PURGE is explicitly specified on the command-line (or rather, "ifPurge" is set in the environment context, OR
      4. TBLPROPERTIES contains "auto.purge"="true"

      Attachments

        1. HIVE-9118.3.patch
          6 kB
          Mithun Radhakrishnan
        2. HIVE-9118.2.patch
          6 kB
          Mithun Radhakrishnan
        3. HIVE-9118.1.patch
          4 kB
          Mithun Radhakrishnan

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mithun Mithun Radhakrishnan Assign to me
            mithun Mithun Radhakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment