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

Stephen O'Donnell commented on HDFS-14200:
------------------------------------------

Thinking about the listEncryptionZone issue, I see in HDFS-12484 the current 
proposal is to suppress the error. In my opinion, unless we can have a 
non-privileged list EZ command, it will be impossible to have emptyTrash clear 
all the users EZ trash directories. We probably don't want to change the 
security level of ListEncryptionZones or add another operation as part of this 
change.

Assuming we can commit HDFS-12484 to suppress the scary warning and update the 
docs, then what about allowing emptyTrash to accept an additional optional 
parameter "trashDirectory". In the default case, it will do what expunge does 
and fail to clear EZ trash, but will clear the users trash. If you pass a 
specific trashDirectory, it will clear only that trash directory.

That would have the added benefit of allowing a superuser to safely delete any 
trash directory on the system.

> Add emptyTrash option to purge trash immediately
> ------------------------------------------------
>
>                 Key: HDFS-14200
>                 URL: https://issues.apache.org/jira/browse/HDFS-14200
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Stephen O'Donnell
>            Assignee: Stephen O'Donnell
>            Priority: Major
>         Attachments: HDFS-14200.001.patch
>
>
> I have always felt the HDFS trash is missing a simple way to empty the 
> current users trash immediately. We have "expunge" but in my experience 
> supporting clusters, end users find this confusing. When most end users run 
> expunge, they really want to empty their trash immediately and get confused 
> when expunge does not do this.
> This can result in users performing somewhat dangerous "skipTrash" operations 
> on the trash to free up space. The alternative, which most users will not 
> figure out on their own is:
> # Run the expunge command once - this will move the current folder to a 
> checkpoint and remove any old checkpoints older than the retention interval
> # Wait over 1 minute and then run expunge again, overriding fs.trash.interval 
> to 1 minute using the following command hadoop fs -Dfs.trash.interval=1 
> -expunge.
> With this Jira I am proposing to add a extra command, "hdfs dfs -emptyTrash" 
> that purges everything in the logged in users Trash directories immediately.
> How would the community feel about adding this new option? I will upload a 
> patch for comments.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to