[jira] [Updated] (HIVE-14626) Support Trash in Truncate Table

2016-09-08 Thread Chaoyu Tang (JIRA)

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

Chaoyu Tang updated HIVE-14626:
---
   Resolution: Fixed
Fix Version/s: 2.2.0
   Status: Resolved  (was: Patch Available)

Committed to 2.2.0. Thanks [~spena] for reviewing the patch.

> Support Trash in Truncate Table
> ---
>
> Key: HIVE-14626
> URL: https://issues.apache.org/jira/browse/HIVE-14626
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Processor
>Reporter: Chaoyu Tang
>Assignee: Chaoyu Tang
>Priority: Minor
> Fix For: 2.2.0
>
> Attachments: HIVE-14626.1.patch, HIVE-14626.patch
>
>
> Currently Truncate Table (or Partition) is implemented using 
> FileSystem.delete and then recreate the directory, so
> 1. it does not support HDFS Trash
> 2. if the table/partition directory is initially encryption protected, after 
> being deleted and recreated, it is no more protected.
> The new implementation is to clean the contents of directory using 
> multi-threaded trashFiles. If Trash is enabled and has a lower encryption 
> level than the data directory, the files under it will be deleted. Otherwise, 
> they will be Trashed



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


[jira] [Updated] (HIVE-14626) Support Trash in Truncate Table

2016-09-07 Thread Chaoyu Tang (JIRA)

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

Chaoyu Tang updated HIVE-14626:
---
Attachment: HIVE-14626.1.patch

[~spena] I revised the patch. It cleans the directory contents only when it is 
encryption-zone protected. For other cases, we do trash/delete the directory 
followed by recreation as you suggested.
I have attached new patch here and also uploaded to RB for review. Thanks. 

> Support Trash in Truncate Table
> ---
>
> Key: HIVE-14626
> URL: https://issues.apache.org/jira/browse/HIVE-14626
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Processor
>Reporter: Chaoyu Tang
>Assignee: Chaoyu Tang
>Priority: Minor
> Attachments: HIVE-14626.1.patch, HIVE-14626.patch
>
>
> Currently Truncate Table (or Partition) is implemented using 
> FileSystem.delete and then recreate the directory, so
> 1. it does not support HDFS Trash
> 2. if the table/partition directory is initially encryption protected, after 
> being deleted and recreated, it is no more protected.
> The new implementation is to clean the contents of directory using 
> multi-threaded trashFiles. If Trash is enabled and has a lower encryption 
> level than the data directory, the files under it will be deleted. Otherwise, 
> they will be Trashed



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


[jira] [Updated] (HIVE-14626) Support Trash in Truncate Table

2016-08-24 Thread Chaoyu Tang (JIRA)

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

Chaoyu Tang updated HIVE-14626:
---
Attachment: HIVE-14626.patch

> Support Trash in Truncate Table
> ---
>
> Key: HIVE-14626
> URL: https://issues.apache.org/jira/browse/HIVE-14626
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Processor
>Reporter: Chaoyu Tang
>Assignee: Chaoyu Tang
>Priority: Minor
> Attachments: HIVE-14626.patch
>
>
> Currently Truncate Table (or Partition) is implemented using 
> FileSystem.delete and then recreate the directory, so
> 1. it does not support HDFS Trash
> 2. if the table/partition directory is initially encryption protected, after 
> being deleted and recreated, it is no more protected.
> The new implementation is to clean the contents of directory using 
> multi-threaded trashFiles. If Trash is enabled and has a lower encryption 
> level than the data directory, the files under it will be deleted. Otherwise, 
> they will be Trashed



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


[jira] [Updated] (HIVE-14626) Support Trash in Truncate Table

2016-08-24 Thread Chaoyu Tang (JIRA)

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

Chaoyu Tang updated HIVE-14626:
---
Status: Patch Available  (was: Open)

> Support Trash in Truncate Table
> ---
>
> Key: HIVE-14626
> URL: https://issues.apache.org/jira/browse/HIVE-14626
> Project: Hive
>  Issue Type: Sub-task
>  Components: Query Processor
>Reporter: Chaoyu Tang
>Assignee: Chaoyu Tang
>Priority: Minor
> Attachments: HIVE-14626.patch
>
>
> Currently Truncate Table (or Partition) is implemented using 
> FileSystem.delete and then recreate the directory, so
> 1. it does not support HDFS Trash
> 2. if the table/partition directory is initially encryption protected, after 
> being deleted and recreated, it is no more protected.
> The new implementation is to clean the contents of directory using 
> multi-threaded trashFiles. If Trash is enabled and has a lower encryption 
> level than the data directory, the files under it will be deleted. Otherwise, 
> they will be Trashed



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