You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Janaki Lahorani (JIRA)" <ji...@apache.org> on 2018/03/27 23:42:00 UTC

[jira] [Commented] (HIVE-17824) msck repair table should drop the missing partitions from metastore

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

Janaki Lahorani commented on HIVE-17824:
----------------------------------------

Hi [~sershe],  [~ashutoshc],  
I plan to address this by changing the syntax as follows:
MSCK [REPAIR] TABLE <table name> [ADD/DROP/SYNC PARTITIONS];
ADD is equivalent to current behavior and will be the default: The metadata will be updated to reflect all the new partitions added in the file system.
DROP will remove the metadata corresponding to partitions that are removed from the filesystem.
SYNC will do both ADD and DROP.
Please let us know your opinion.  If I don't hear from you in the next couple of days I will assume that you are okay with this syntax, and proceed to upload the patch.
Thanks for your time.

> msck repair table should drop the missing partitions from metastore
> -------------------------------------------------------------------
>
>                 Key: HIVE-17824
>                 URL: https://issues.apache.org/jira/browse/HIVE-17824
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Vihang Karajgaonkar
>            Assignee: Janaki Lahorani
>            Priority: Major
>
> {{msck repair table <tablename>}} is often used in environments where the new partitions are loaded as directories on HDFS or S3 and users want to create the missing partitions in bulk. However, currently it only supports addition of missing partitions. If there are any partitions which are present in metastore but not on the FileSystem, it should also delete them so that it truly repairs the table metadata.
> We should be careful not to break backwards compatibility so we should either introduce a new config or keyword to add support to delete unnecessary partitions from the metastore. This way users who want the old behavior can easily turn it off. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)