HADOOP-14758. S3GuardTool.prune to handle UnsupportedOperationException.
Contributed by Gabor Bota.
This commit is contained in:
parent
93d47a0ed5
commit
5a174f8ac6
|
@ -966,7 +966,11 @@ public abstract class S3GuardTool extends Configured implements Tool {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
long divide = now - delta;
|
long divide = now - delta;
|
||||||
|
|
||||||
getStore().prune(divide);
|
try {
|
||||||
|
getStore().prune(divide);
|
||||||
|
} catch (UnsupportedOperationException e){
|
||||||
|
errorln("Prune operation not supported in metadata store.");
|
||||||
|
}
|
||||||
|
|
||||||
out.flush();
|
out.flush();
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue