You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2019/08/05 12:10:22 UTC

[hadoop] branch branch-3.2 updated: HDFS-14691. Wrong usage hint for hadoop fs command "test".

This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 0c02217  HDFS-14691. Wrong usage hint for hadoop fs command "test".
0c02217 is described below

commit 0c02217d9b63c8200a5ecb326cceef5fda1c2d3c
Author: Jianfei Jiang <ji...@gmail.com>
AuthorDate: Mon Aug 5 13:09:39 2019 +0100

    HDFS-14691. Wrong usage hint for hadoop fs command "test".
    
    Contributed by Jianfei Jiang.
    
    Change-Id: I9f5e89721ff210641375fbf42a70043f0d74458e
    (cherry picked from commit 71aad60e519da729249d3c06389f2efa8d9ae212)
---
 .../hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Test.java  | 2 +-
 .../hadoop-common/src/site/markdown/FileSystemShell.md                | 4 ++--
 hadoop-common-project/hadoop-common/src/test/resources/testConf.xml   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Test.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Test.java
index a2d2529..b3acc98 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Test.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Test.java
@@ -39,7 +39,7 @@ class Test extends FsCommand {
   }
 
   public static final String NAME = "test";
-  public static final String USAGE = "-[defsz] <path>";
+  public static final String USAGE = "-[defswrz] <path>";
   public static final String DESCRIPTION =
       "Answer various questions about <path>, with result via exit status.\n"
           + "  -d  return 0 if <path> is a directory.\n"
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 22dfb39..f055924 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/FileSystemShell.md
@@ -720,7 +720,7 @@ Exit Code: Returns 0 on success and -1 on error.
 test
 ----
 
-Usage: `hadoop fs -test -[defsz] URI`
+Usage: `hadoop fs -test -[defswrz] URI`
 
 Options:
 
@@ -728,8 +728,8 @@ Options:
 * -e: if the path exists, return 0.
 * -f: if the path is a file, return 0.
 * -s: if the path is not empty, return 0.
-* -r: if the path exists and read permission is granted, return 0.
 * -w: if the path exists and write permission is granted, return 0.
+* -r: if the path exists and read permission is granted, return 0.
 * -z: if the file is zero length, return 0.
 
 
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 29a88fc..7529f9b 100644
--- a/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml
+++ b/hadoop-common-project/hadoop-common/src/test/resources/testConf.xml
@@ -923,7 +923,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^-test -\[defsz\] &lt;path&gt; :\s*</expected-output>
+          <expected-output>^-test -\[defswrz\] &lt;path&gt; :\s*</expected-output>
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
@@ -931,7 +931,7 @@
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^\s*-[defsz]\s+return 0 if .*</expected-output>
+          <expected-output>^\s*-[defswrz]\s+return 0 if .*</expected-output>
         </comparator>
       </comparators>
     </test>


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org