HDFS-14691. Wrong usage hint for hadoop fs command "test".
Contributed by Jianfei Jiang. Change-Id: I9f5e89721ff210641375fbf42a70043f0d74458e
This commit is contained in:
parent
f8ea6e1ce1
commit
71aad60e51
@ -39,7 +39,7 @@ public static void registerCommands(CommandFactory factory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final String NAME = "test";
|
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 =
|
public static final String DESCRIPTION =
|
||||||
"Answer various questions about <path>, with result via exit status.\n"
|
"Answer various questions about <path>, with result via exit status.\n"
|
||||||
+ " -d return 0 if <path> is a directory.\n"
|
+ " -d return 0 if <path> is a directory.\n"
|
||||||
|
@ -733,7 +733,7 @@ Exit Code: Returns 0 on success and -1 on error.
|
|||||||
test
|
test
|
||||||
----
|
----
|
||||||
|
|
||||||
Usage: `hadoop fs -test -[defsz] URI`
|
Usage: `hadoop fs -test -[defswrz] URI`
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
@ -741,8 +741,8 @@ Options:
|
|||||||
* -e: if the path exists, return 0.
|
* -e: if the path exists, return 0.
|
||||||
* -f: if the path is a file, return 0.
|
* -f: if the path is a file, return 0.
|
||||||
* -s: if the path is not empty, 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.
|
* -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.
|
* -z: if the file is zero length, return 0.
|
||||||
|
|
||||||
|
|
||||||
|
@ -923,7 +923,7 @@
|
|||||||
<comparators>
|
<comparators>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>RegexpComparator</type>
|
<type>RegexpComparator</type>
|
||||||
<expected-output>^-test -\[defsz\] <path> :\s*</expected-output>
|
<expected-output>^-test -\[defswrz\] <path> :\s*</expected-output>
|
||||||
</comparator>
|
</comparator>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>RegexpComparator</type>
|
<type>RegexpComparator</type>
|
||||||
@ -931,7 +931,7 @@
|
|||||||
</comparator>
|
</comparator>
|
||||||
<comparator>
|
<comparator>
|
||||||
<type>RegexpComparator</type>
|
<type>RegexpComparator</type>
|
||||||
<expected-output>^\s*-[defsz]\s+return 0 if .*</expected-output>
|
<expected-output>^\s*-[defswrz]\s+return 0 if .*</expected-output>
|
||||||
</comparator>
|
</comparator>
|
||||||
</comparators>
|
</comparators>
|
||||||
</test>
|
</test>
|
||||||
|
Loading…
Reference in New Issue
Block a user