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

Eugene Koifman updated HIVE-10630:
----------------------------------
    Attachment: HIVE-10630.patch

The fix is really fixing general bugs/error reporting in ALTER TABLE - not 
specific to TDE.

[~spena],  did you create any facility for negative tests for TDE?
I wanted to create something like 
{noformat}
--SORT_QUERY_RESULTS

DROP TABLE IF EXISTS encrypted_table;
CREATE TABLE encrypted_table (key INT, value STRING) LOCATION 
'${hiveconf:hive.metastore.warehouse.dir}/default/encrypted_table';
CRYPTO CREATE_KEY --keyName key_128 --bitLength 128;
CRYPTO CREATE_ZONE --keyName key_128 --path 
${hiveconf:hive.metastore.warehouse.dir}/default/encrypted_table;

INSERT OVERWRITE TABLE encrypted_table SELECT * FROM src;

SHOW TABLES;

ALTER TABLE default.encrypted_table RENAME TO default.plain_table;

SHOW TABLES;
drop table encrypted_table;
CRYPTO DELETE_KEY --keyName key_128;
{noformat}
but that doesn't work with TestEncryptedHDFSCliDriver

> Renaming tables across encryption zones renames table even though the 
> operation throws error
> --------------------------------------------------------------------------------------------
>
>                 Key: HIVE-10630
>                 URL: https://issues.apache.org/jira/browse/HIVE-10630
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Metastore, Security
>            Reporter: Deepesh Khandelwal
>            Assignee: Eugene Koifman
>         Attachments: HIVE-10630.patch
>
>
> Create a table with data in an encrypted zone 1 and then rename it to 
> encrypted zone 2.
> {noformat}
> hive> alter table encdb1.testtbl rename to encdb2.testtbl;
> FAILED: Execution Error, return code 1 from 
> org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. Unable to 
> access old location 
> hdfs://node-1.example.com:8020/apps/hive/warehouse/encdb1.db/testtbl for 
> table encdb1.testtbl
> {noformat}
> Even though the command errors out the table is renamed. I think the right 
> behavior should be to not rename the table at all including the metadata.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to