diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt index 9ab55864cc9..cc73edf9164 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-4949.txt @@ -93,3 +93,6 @@ HDFS-4949 (Unreleased) HDFS-5348. Fix error message when dfs.datanode.max.locked.memory is improperly configured. (Colin Patrick McCabe) + + HDFS-5373. hdfs cacheadmin -addDirective short usage does not mention + -replication parameter. (cnauroth) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java index ebbfba86e36..0aa93169d80 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java @@ -131,7 +131,8 @@ public class CacheAdmin extends Configured implements Tool { @Override public String getShortUsage() { - return "[" + getName() + " -path -pool ]\n"; + return "[" + getName() + + " -path -replication -pool ]\n"; } @Override diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testCacheAdminConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testCacheAdminConf.xml index 07fb44cc331..2e7506dcbef 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testCacheAdminConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testCacheAdminConf.xml @@ -167,6 +167,7 @@ -addPool pool1 -addDirective -path /foo -pool pool1 -addDirective -path /bar -pool pool1 + -addDirective -path /baz -replication 2 -pool pool1 -listDirectives -pool pool1 @@ -175,7 +176,7 @@ SubstringComparator - Found 2 entries + Found 3 entries SubstringComparator @@ -185,6 +186,10 @@ SubstringComparator 2 pool1 /bar + + SubstringComparator + 3 pool1 /baz +