HADOOP-13538. Deprecate getInstance and initialize methods with Path in TrashPolicy. Contributed by Yiqun Lin.
(cherry picked from commit 092b4d5bfd02131d62723fc5673892305eb9fcef) (cherry picked from commit 2321b73037fcf7ea9ee60c1a94838233c3df8908)
This commit is contained in:
parent
8bc33bf343
commit
f871aed87e
@ -42,7 +42,9 @@ public abstract class TrashPolicy extends Configured {
|
|||||||
* @param conf the configuration to be used
|
* @param conf the configuration to be used
|
||||||
* @param fs the filesystem to be used
|
* @param fs the filesystem to be used
|
||||||
* @param home the home directory
|
* @param home the home directory
|
||||||
|
* @deprecated Use {@link #initialize(Configuration, FileSystem)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public abstract void initialize(Configuration conf, FileSystem fs, Path home);
|
public abstract void initialize(Configuration conf, FileSystem fs, Path home);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,7 +118,9 @@ public Path getCurrentTrashDir(Path path) throws IOException {
|
|||||||
* @param fs the file system to be used
|
* @param fs the file system to be used
|
||||||
* @param home the home directory
|
* @param home the home directory
|
||||||
* @return an instance of TrashPolicy
|
* @return an instance of TrashPolicy
|
||||||
|
* @deprecated Use {@link #getInstance(Configuration, FileSystem)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static TrashPolicy getInstance(Configuration conf, FileSystem fs, Path home) {
|
public static TrashPolicy getInstance(Configuration conf, FileSystem fs, Path home) {
|
||||||
Class<? extends TrashPolicy> trashClass = conf.getClass(
|
Class<? extends TrashPolicy> trashClass = conf.getClass(
|
||||||
"fs.trash.classname", TrashPolicyDefault.class, TrashPolicy.class);
|
"fs.trash.classname", TrashPolicyDefault.class, TrashPolicy.class);
|
||||||
|
@ -75,7 +75,11 @@ private TrashPolicyDefault(FileSystem fs, Configuration conf)
|
|||||||
initialize(conf, fs);
|
initialize(conf, fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #initialize(Configuration, FileSystem)} instead.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Deprecated
|
||||||
public void initialize(Configuration conf, FileSystem fs, Path home) {
|
public void initialize(Configuration conf, FileSystem fs, Path home) {
|
||||||
this.fs = fs;
|
this.fs = fs;
|
||||||
this.deletionInterval = (long)(conf.getFloat(
|
this.deletionInterval = (long)(conf.getFloat(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user