HDFS-14691. Wrong usage hint for hadoop fs command "test".

Contributed by Jianfei Jiang.

Change-Id: I9f5e89721ff210641375fbf42a70043f0d74458e
This commit is contained in:
Jianfei Jiang 2019-08-05 13:08:47 +01:00 committed by Steve Loughran
parent f8ea6e1ce1
commit 71aad60e51
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
3 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ public static void registerCommands(CommandFactory factory) {
}
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"

View File

@ -733,7 +733,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:
@ -741,8 +741,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.

View File

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