|
@@ -19,6 +19,7 @@ package org.apache.hadoop.fs;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
+import org.apache.commons.logging.LogFactory;
|
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
|
import org.apache.hadoop.classification.InterfaceStability;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
@@ -33,6 +34,9 @@ import org.apache.hadoop.conf.Configured;
|
|
|
@InterfaceAudience.Public
|
|
|
@InterfaceStability.Stable
|
|
|
public class Trash extends Configured {
|
|
|
+ private static final org.apache.commons.logging.Log LOG =
|
|
|
+ LogFactory.getLog(Trash.class);
|
|
|
+
|
|
|
private TrashPolicy trashPolicy; // configured trash policy instance
|
|
|
|
|
|
/**
|
|
@@ -84,6 +88,7 @@ public class Trash extends Configured {
|
|
|
} catch (Exception e) {
|
|
|
// If we can not determine that trash is enabled server side then
|
|
|
// bail rather than potentially deleting a file when trash is enabled.
|
|
|
+ LOG.warn("Failed to get server trash configuration", e);
|
|
|
throw new IOException("Failed to get server trash configuration", e);
|
|
|
}
|
|
|
Trash trash = new Trash(fullyResolvedFs, conf);
|