HDFS-5373. hdfs cacheadmin -addDirective short usage does not mention -replication parameter. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-4949@1532888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2013-10-16 20:23:14 +00:00
parent 2cf5084c32
commit 8da82eba1c
3 changed files with 11 additions and 2 deletions

View File

@ -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)

View File

@ -131,7 +131,8 @@ public class CacheAdmin extends Configured implements Tool {
@Override
public String getShortUsage() {
return "[" + getName() + " -path <path> -pool <pool-name>]\n";
return "[" + getName() +
" -path <path> -replication <replication> -pool <pool-name>]\n";
}
@Override

View File

@ -167,6 +167,7 @@
<cache-admin-command>-addPool pool1</cache-admin-command>
<cache-admin-command>-addDirective -path /foo -pool pool1</cache-admin-command>
<cache-admin-command>-addDirective -path /bar -pool pool1</cache-admin-command>
<cache-admin-command>-addDirective -path /baz -replication 2 -pool pool1</cache-admin-command>
<cache-admin-command>-listDirectives -pool pool1</cache-admin-command>
</test-commands>
<cleanup-commands>
@ -175,7 +176,7 @@
<comparators>
<comparator>
<type>SubstringComparator</type>
<expected-output>Found 2 entries</expected-output>
<expected-output>Found 3 entries</expected-output>
</comparator>
<comparator>
<type>SubstringComparator</type>
@ -185,6 +186,10 @@
<type>SubstringComparator</type>
<expected-output>2 pool1 /bar</expected-output>
</comparator>
<comparator>
<type>SubstringComparator</type>
<expected-output>3 pool1 /baz</expected-output>
</comparator>
</comparators>
</test>