HDFS-14691. Wrong usage hint for hadoop fs command "test".
Contributed by Jianfei Jiang.
Change-Id: I9f5e89721ff210641375fbf42a70043f0d74458e
(cherry picked from commit 71aad60e51
)
This commit is contained in:
parent
2634aaaf9a
commit
0c02217d9b
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -923,7 +923,7 @@
|
|||
<comparators>
|
||||
<comparator>
|
||||
<type>RegexpComparator</type>
|
||||
<expected-output>^-test -\[defsz\] <path> :\s*</expected-output>
|
||||
<expected-output>^-test -\[defswrz\] <path> :\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>
|
||||
|
|
Loading…
Reference in New Issue