You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/01/09 11:25:12 UTC

[jira] [Commented] (HIVE-3134) Drop table/index/database can result in orphaned locations

    [ https://issues.apache.org/jira/browse/HIVE-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547902#comment-13547902 ] 

Hudson commented on HIVE-3134:
------------------------------

Integrated in Hive-trunk-hadoop2 #54 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/54/])
    HIVE-3134 Drop table/index/database can result in orphaned locations
(Kevin Wilfong via Carl Steinbach)

Summary:
Today when a managed table has a partition with a location which is not a subdirectory of the table's location, when the table is dropped the partition's data is not deleted from HDFS, resulting in an orphaned directory (the data exists but nothing points to it).

The same applies to dropping a database with cascade and a table has a location outside the database.

I think it is safe to assume managed tables/partitions own the directories they point to, so we should clean these up.

Test Plan: Added test cases to verify that the directories which would be orphaned are cleaned up by drop table/index/database.

Reviewers: JIRA, njain, cwsteinbach

Reviewed By: cwsteinbach

Differential Revision: https://reviews.facebook.net/D3633 (Revision 1351174)

     Result = ABORTED
cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1351174
Files : 
* /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
* /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
* /hive/trunk/ql/src/test/queries/clientpositive/drop_database_removes_partition_dirs.q
* /hive/trunk/ql/src/test/queries/clientpositive/drop_index_removes_partition_dirs.q
* /hive/trunk/ql/src/test/queries/clientpositive/drop_table_removes_partition_dirs.q
* /hive/trunk/ql/src/test/results/clientpositive/drop_database_removes_partition_dirs.q.out
* /hive/trunk/ql/src/test/results/clientpositive/drop_index_removes_partition_dirs.q.out
* /hive/trunk/ql/src/test/results/clientpositive/drop_table_removes_partition_dirs.q.out

                
> Drop table/index/database can result in orphaned locations
> ----------------------------------------------------------
>
>                 Key: HIVE-3134
>                 URL: https://issues.apache.org/jira/browse/HIVE-3134
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Kevin Wilfong
>            Assignee: Kevin Wilfong
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3134.1.patch.txt, HIVE-3134.2.patch.txt
>
>
> Today when a managed table has a partition with a location which is not a subdirectory of the table's location, when the table is dropped the partition's data is not deleted from HDFS, resulting in an orphaned directory (the data exists but nothing points to it).
> The same applies to dropping a database with cascade and a table has a location outside the database.
> I think it is safe to assume managed tables/partitions own the directories they point to, so we should clean these up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira