diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index b637358d7ef..8ae0128c113 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -819,6 +819,9 @@ Release 2.8.0 - UNRELEASED BUG FIXES + HADOOP-12374. Updated expunge command description. + (WeiWei Yang via eyang) + HADOOP-12352. Delay in checkpointing Trash can leave trash for 2 intervals before deleting (Casey Brotherton via harsh) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java index ec45d173bf8..6983eb922c8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java @@ -215,11 +215,14 @@ class Delete { } } - /** empty the trash */ + // delete files from the trash that are older + // than the retention threshold. static class Expunge extends FsCommand { public static final String NAME = "expunge"; public static final String USAGE = ""; - public static final String DESCRIPTION = "Empty the Trash"; + public static final String DESCRIPTION = + "Delete files from the trash that are older " + + "than the retention threshold"; // TODO: should probably allow path arguments for the filesystems @Override diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md b/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md index d6d00e4f4d3..2ea5abafd6a 100644 --- a/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md +++ b/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md @@ -271,7 +271,7 @@ expunge Usage: `hadoop fs -expunge` -Empty the Trash. Refer to the [HDFS Architecture Guide](../hadoop-hdfs/HdfsDesign.html) for more information on the Trash feature. +If trash is enabled when a file is deleted, HDFS instead moves the deleted file to a trash directory. This command causes HDFS to permanently delete files from the trash that are older than the retention threshold. Refer to the [File Deletes and Undeletes Guide](../hadoop-hdfs/HdfsDesign.html#File_Deletes_and_Undeletes) in Space Reclamation section for more information on the Trash feature. find ----