HADOOP-14758. S3GuardTool.prune to handle UnsupportedOperationException.

Contributed by Gabor Bota.
This commit is contained in:
Steve Loughran 2018-04-03 16:31:34 +01:00
parent 93d47a0ed5
commit 5a174f8ac6
1 changed files with 5 additions and 1 deletions

View File

@ -966,7 +966,11 @@ public abstract class S3GuardTool extends Configured implements Tool {
long now = System.currentTimeMillis();
long divide = now - delta;
getStore().prune(divide);
try {
getStore().prune(divide);
} catch (UnsupportedOperationException e){
errorln("Prune operation not supported in metadata store.");
}
out.flush();
return SUCCESS;