hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sushanth Sowmyan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-6406) Introduce immutable-table table property and if set, disallow insert-into
Date Thu, 20 Feb 2014 19:47:27 GMT

     [ https://issues.apache.org/jira/browse/HIVE-6406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sushanth Sowmyan updated HIVE-6406:
-----------------------------------

    Release Note: 
This patch introduces a new table property "immutable".

If we create a table with TBLPROPERTIES("immutable"="true"), then INSERT INTO behaviour into
that table will be disallowed if there is any data already present that the INSERT INTO would
append to.

INSERT INTO will still work if it is empty.

INSERT OVERWRITE behaviour is not modified by this property, since an INSERT OVERWRITE's intent
is effectively to drop and re-create.

The desirability of having an immutable flag for a table is that it allows a table to be flagged
to be protected against accidental updates due to a script loading data into it being run
multiple times by mistake. With the flag set, the first insert would succeed, and successive
inserts would fail, thus resulting in only one set of data in the table, instead of silently
succeeding with 4 copies(say) of the data in the table.


> Introduce immutable-table table property and if set, disallow insert-into
> -------------------------------------------------------------------------
>
>                 Key: HIVE-6406
>                 URL: https://issues.apache.org/jira/browse/HIVE-6406
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HCatalog, Metastore, Query Processor, Thrift API
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>             Fix For: 0.13.0
>
>         Attachments: HIVE-6406.2.patch, HIVE-6406.3.patch, HIVE-6406.patch
>
>
> As part of HIVE-6405's attempt to make HCatalog and Hive behave in similar ways with
regards to immutable tables, this is a companion task to introduce the notion of an immutable
table, wherein all tables are not immutable by default, and have this be a table property.
If this property is set for a table, and we attempt to write to a table that already has data
(or a partition), disallow "INSERT INTO" into it from hive(if destination directory is non-empty).
This property being set will allow hive to mimic HCatalog's current immutable-table property.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message