From 84d8ba4f722ce806391f3434268f08a96aae8741 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 5 May 2015 08:37:37 -0700 Subject: [PATCH] HADOOP-11120. hadoop fs -rmr gives wrong advice. Contributed by Juliet Houghland. (cherry picked from commit 05adc76ace6bf28e4a3ff874044c2c41e3eba63f) --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../src/main/java/org/apache/hadoop/fs/shell/Delete.java | 2 +- .../hadoop-common/src/test/resources/testConf.xml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index fd5bb4b3842..d885c415bfb 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -70,6 +70,8 @@ Release 2.8.0 - UNRELEASED HADOOP-11328. ZKFailoverController does not log Exception when doRun raises errors. (Tianyin Xu via ozawa) + HADOOP-11120. hadoop fs -rmr gives wrong advice. (Juliet Hougland via wang) + OPTIMIZATIONS HADOOP-11785. Reduce the number of listStatus operation in distcp 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 6798fbee438..f882817e92e 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 @@ -141,7 +141,7 @@ class Delete { @Override public String getReplacementCommand() { - return "rm -r"; + return "-rm -r"; } } diff --git a/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml b/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml index 3729cf98a61..d36efd5d26b 100644 --- a/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml +++ b/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml @@ -429,7 +429,7 @@ RegexpComparator - ^\s*\(DEPRECATED\) Same as 'rm -r'\s* + ^\s*\(DEPRECATED\) Same as '-rm -r'\s*