[ https://issues.apache.org/jira/browse/HADOOP-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417351#comment-16417351 ]
Sean Mackrory commented on HADOOP-14759: ---------------------------------------- The command as I wrote it above (bin/hadoop s3guard prune -hours 1 -meta dynamodb://table_name) should be allowed - it's certainly valid usage. It just means that rather than pruning the metadata for a bucket or subset of a bucket, you want to prune the data for everything in the table (and honestly I think that's the more common use-case, unless people have specific policies about which datasets they want to permanently keep cached metadata for). So yeah instead of throwing an error, let's have keyPrefix = "/" unless the s3 URL is provided, then we use that to specify a whole key prefix including bucket name and directory name. The rangeCheck in the exception is being done in ArrayList and not String, though, so you need to check that paths.size() > 0, not paths.get(0).length() != 0 (which I think is what you meant). > 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 > > > 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