You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2016/08/25 04:55:31 UTC
hadoop git commit: HADOOP-13534. Remove unused
TrashPolicy#getInstance and initialize code. Contributed by Yiqun Lin.
Repository: hadoop
Updated Branches:
refs/heads/trunk 5a6fc5f48 -> ab3b727b5
HADOOP-13534. Remove unused TrashPolicy#getInstance and initialize code. Contributed by Yiqun Lin.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ab3b727b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ab3b727b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ab3b727b
Branch: refs/heads/trunk
Commit: ab3b727b5f1511ea05f75d8798eaf85f6defcf53
Parents: 5a6fc5f
Author: Akira Ajisaka <aa...@apache.org>
Authored: Thu Aug 25 13:54:57 2016 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Thu Aug 25 13:54:57 2016 +0900
----------------------------------------------------------------------
.../java/org/apache/hadoop/fs/TrashPolicy.java | 30 --------------------
.../apache/hadoop/fs/TrashPolicyDefault.java | 15 ----------
.../java/org/apache/hadoop/fs/TestTrash.java | 4 ---
3 files changed, 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/ab3b727b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicy.java
----------------------------------------------------------------------
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 157b9ab..bd99db4 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
@@ -38,17 +38,6 @@ public abstract class TrashPolicy extends Configured {
/**
* Used to setup the trash policy. Must be implemented by all TrashPolicy
- * implementations.
- * @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);
-
- /**
- * Used to setup the trash policy. Must be implemented by all TrashPolicy
* implementations. Different from initialize(conf, fs, home), this one does
* not assume trash always under /user/$USER due to HDFS encryption zone.
* @param conf the configuration to be used
@@ -116,25 +105,6 @@ public abstract class TrashPolicy extends Configured {
*
* @param conf the configuration to be used
* @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<? extends TrashPolicy> trashClass = conf.getClass(
- "fs.trash.classname", TrashPolicyDefault.class, TrashPolicy.class);
- TrashPolicy trash = ReflectionUtils.newInstance(trashClass, conf);
- trash.initialize(conf, fs, home); // initialize TrashPolicy
- return trash;
- }
-
- /**
- * Get an instance of the configured TrashPolicy based on the value
- * of the configuration parameter fs.trash.classname.
- *
- * @param conf the configuration to be used
- * @param fs the file system to be used
* @return an instance of TrashPolicy
*/
public static TrashPolicy getInstance(Configuration conf, FileSystem fs)
http://git-wip-us.apache.org/repos/asf/hadoop/blob/ab3b727b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
----------------------------------------------------------------------
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 72222be..f4a825c 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,21 +75,6 @@ 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(
- FS_TRASH_INTERVAL_KEY, FS_TRASH_INTERVAL_DEFAULT)
- * MSECS_PER_MINUTE);
- this.emptierInterval = (long)(conf.getFloat(
- FS_TRASH_CHECKPOINT_INTERVAL_KEY, FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT)
- * MSECS_PER_MINUTE);
- }
-
@Override
public void initialize(Configuration conf, FileSystem fs) {
this.fs = fs;
http://git-wip-us.apache.org/repos/asf/hadoop/blob/ab3b727b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
index 338aff6..2aba01f 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java
@@ -692,10 +692,6 @@ public class TestTrash extends TestCase {
public TestTrashPolicy() { }
@Override
- public void initialize(Configuration conf, FileSystem fs, Path home) {
- }
-
- @Override
public void initialize(Configuration conf, FileSystem fs) {
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org