diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicy.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicy.java index 92a4d1f2822..157b9ab5ee9 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicy.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicy.java @@ -42,7 +42,9 @@ public abstract class TrashPolicy extends Configured { * @param conf the configuration to be used * @param fs the filesystem to be used * @param home the home directory + * @deprecated Use {@link #initialize(Configuration, FileSystem)} instead. */ + @Deprecated public abstract void initialize(Configuration conf, FileSystem fs, Path home); /** @@ -116,7 +118,9 @@ public abstract class TrashPolicy extends Configured { * @param fs the file system to be used * @param home the home directory * @return an instance of TrashPolicy + * @deprecated Use {@link #getInstance(Configuration, FileSystem)} instead. */ + @Deprecated public static TrashPolicy getInstance(Configuration conf, FileSystem fs, Path home) { Class trashClass = conf.getClass( "fs.trash.classname", TrashPolicyDefault.class, TrashPolicy.class); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java index 66ef8908603..72222be04a8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java @@ -75,7 +75,11 @@ public class TrashPolicyDefault extends TrashPolicy { initialize(conf, fs); } + /** + * @deprecated Use {@link #initialize(Configuration, FileSystem)} instead. + */ @Override + @Deprecated public void initialize(Configuration conf, FileSystem fs, Path home) { this.fs = fs; this.deletionInterval = (long)(conf.getFloat(