Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22995 Add support for location for managed tables on database
  3. HIVE-24135

Drop database doesn't delete directory in managed location

    XMLWordPrintableJSON

Details

    Description

      Repro:
      say the default managed location is managed/hive and the default external location is external/hive.

      create database db1; -- creates: external/hive/db1.db
      create table db1.table1 (i int); -- creates: managed/hive/db1.db and  managed/hive/db1.db/table1
      drop database db1 cascade; -- removes : external/hive/db1.db and managed/hive/db1.db/table1
      

      Problem: Directory managed/hive/db1.db remains.

      Since HIVE-22995, dbs have a managed (managedLocationUri) and an external location (locationUri). I think the issue is that HiveMetaStore.HMSHandler#drop_database_core deletes only the db directory in the external location.

      Attachments

        Activity

          People

            ngangam Naveen Gangam
            klcopp Karen Coppage
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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