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

Aaron Fabbri commented on HADOOP-14759:
---------------------------------------

This looks pretty good, thanks for the work on this useful feature.

{noformat}
+```bash
+hadoop s3guard prune -hours 1 -minutes 30 -meta 
dynamodb://ireland-team/path_prefix/ -region eu-west-1
+```
+
+Delete all entries more than 90 minutes old from the table "ireland-team" with
+prefix "path_prefix" in the region "eu-west-1".
{noformat}

I think the path_prefix goes in the s3a:// URI, not the MetadataStore URI, 
right?  I tested this like so:

{noformat}
hadoop s3guard prune -hours 24 s3a://my-bucket/stuffs/c
{noformat}

and confirmed that it only pruned the entries starting with /stuffs/c, as 
expected.  I also ran the integration tests in us-west-2. I'm +1 on the patch 
once the docs are fixed.


> S3GuardTool prune to prune specific bucket entries
> --------------------------------------------------
>
>                 Key: HADOOP-14759
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14759
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.0.0-beta1
>            Reporter: Steve Loughran
>            Assignee: Gabor Bota
>            Priority: Minor
>         Attachments: HADOOP-14759.001.patch, HADOOP-14759.002.patch, 
> HADOOP-14759.003.patch, HADOOP-14759.004.patch, HADOOP-14759.005.patch, 
> HADOOP-14759.006.patch
>
>
> Users may think that when you provide a URI to a bucket, you are pruning all 
> entries in the table *for that bucket*. In fact you are purging all entries 
> across all buckets in the table:
> {code}
> hadoop s3guard prune -days 7 s3a://ireland-1
> {code}
> It should be restricted to that bucket, unless you specify otherwise
> +maybe also add a hard date rather than a relative one



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

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

Reply via email to