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

View File

@ -966,7 +966,11 @@ public int run(String[] args, PrintStream out) throws
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;