You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Carl Steinbach (JIRA)" <ji...@apache.org> on 2013/06/14 08:28:20 UTC

[jira] [Commented] (HIVE-4735) table's lifecycle should be controlled in Hive

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

Carl Steinbach commented on HIVE-4735:
--------------------------------------

I think all of the metadata infrastructure that is required to support this use case is already available in the form of the TBLPROPERTIES mechanism, e.g:

ALTER TABLE src SET TBLPROPERTIES('LIFECYCLE'='50d');

                
> table's lifecycle should be controlled in Hive
> ----------------------------------------------
>
>                 Key: HIVE-4735
>                 URL: https://issues.apache.org/jira/browse/HIVE-4735
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: caofangkun
>            Priority: Minor
>
> Example as:
> -- create table src,and set it's lifecycle as 100 days
> -- alter 100 days the table will be dropped automatically
> CREATE TABLE src (key string) LIFECYCLE 100d; 
> -- alter table src and reset it's lifecycle as 50 day
> ALTER TABLE src SET LIFECYCLE 50d;
> -- alter specific table partition's lifecycle
> ALTER TABLE srcpart PARTITION (dt='20130614',hr='10') SET LIFECYCLE 50d;

--
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