HDFS-11061. Update dfs -count -t command line help and documentation. 
Contributed by Yiqun Lin.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/112f04eb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/112f04eb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/112f04eb

Branch: refs/heads/HDFS-10285
Commit: 112f04eb1b771e410ffd232a46e0ee2bc7b99d06
Parents: 8a9388e
Author: Wei-Chiu Chuang <[email protected]>
Authored: Fri Oct 28 15:33:27 2016 -0700
Committer: Wei-Chiu Chuang <[email protected]>
Committed: Fri Oct 28 15:33:27 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/fs/shell/Count.java     | 9 +++++++--
 .../hadoop-common/src/site/markdown/FileSystemShell.md      | 2 +-
 .../src/test/java/org/apache/hadoop/fs/shell/TestCount.java | 9 +++++++--
 3 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/112f04eb/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Count.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Count.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Count.java
index 16f52e3..d15ae46 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Count.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Count.java
@@ -78,12 +78,17 @@ public class Count extends FsCommand {
           "The -" + OPTION_EXCLUDE_SNAPSHOT + " option excludes snapshots " +
           "from being calculated. \n" +
           "The -" + OPTION_TYPE + " option displays quota by storage types.\n" 
+
-          "It must be used with -" + OPTION_QUOTA + " option.\n" +
+          "It should be used with -" + OPTION_QUOTA + " or -" +
+          OPTION_QUOTA_AND_USAGE + " option, otherwise it will be ignored.\n" +
           "If a comma-separated list of storage types is given after the -" +
           OPTION_TYPE + " option, \n" +
           "it displays the quota and usage for the specified types. \n" +
           "Otherwise, it displays the quota and usage for all the storage \n" +
-          "types that support quota \n" +
+          "types that support quota. The list of possible storage " +
+          "types(case insensitive):\n" +
+          "ram_disk, ssd, disk and archive.\n" +
+          "It can also pass the value '', 'all' or 'ALL' to specify all " +
+          "the storage types.\n" +
           "The -" + OPTION_QUOTA_AND_USAGE + " option shows the quota and \n" +
           "the usage against the quota without the detailed content summary.";
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/112f04eb/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
----------------------------------------------------------------------
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 060c775..c48ff5c 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
@@ -142,7 +142,7 @@ The output columns with -count -q are: QUOTA, 
REMAINING\_QUOTA, SPACE\_QUOTA, RE
 
 The output columns with -count -u are: QUOTA, REMAINING\_QUOTA, SPACE\_QUOTA, 
REMAINING\_SPACE\_QUOTA
 
-The -t option shows the quota and usage for each storage type.
+The -t option shows the quota and usage for each storage type. The -t option 
is ignored if -u or -q option is not given. The list of possible parameters 
that can be used in -t option(case insensitive except the parameter ""): "", 
"all", "ram_disk", "ssd", "disk" or "archive".
 
 The -h option shows sizes in human readable format.
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/112f04eb/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
index c7b30e4..2a1c38c 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
@@ -467,11 +467,16 @@ public class TestCount {
         + "The -v option displays a header line.\n"
         + "The -x option excludes snapshots from being calculated. \n"
         + "The -t option displays quota by storage types.\n"
-        + "It must be used with -q option.\n"
+        + "It should be used with -q or -u option, "
+        + "otherwise it will be ignored.\n"
         + "If a comma-separated list of storage types is given after the -t 
option, \n"
         + "it displays the quota and usage for the specified types. \n"
         + "Otherwise, it displays the quota and usage for all the storage \n"
-        + "types that support quota \n"
+        + "types that support quota. The list of possible storage "
+        + "types(case insensitive):\n"
+        + "ram_disk, ssd, disk and archive.\n"
+        + "It can also pass the value '', 'all' or 'ALL' to specify all the "
+        + "storage types.\n"
         + "The -u option shows the quota and \n"
         + "the usage against the quota without the detailed content summary.";
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to