HDFS-5895. HDFS cacheadmin -listPools has exit_code of 1 when the command returns 0 result. Contributed by Tassapol Athiapinya.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1565440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0cda48959
commit
12c2582c1f
|
@ -342,6 +342,9 @@ Release 2.4.0 - UNRELEASED
|
|||
|
||||
HDFS-5881. Fix skip() of the short-circuit local reader(legacy). (kihwal)
|
||||
|
||||
HDFS-5895. HDFS cacheadmin -listPools has exit_code of 1 when the command
|
||||
returns 0 result. (Tassapol Athiapinya via cnauroth)
|
||||
|
||||
Release 2.3.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -962,9 +962,8 @@ public class CacheAdmin extends Configured implements Tool {
|
|||
if (numResults > 0) {
|
||||
System.out.print(listing);
|
||||
}
|
||||
// If there are no results, we return 1 (failure exit code);
|
||||
// otherwise we return 0 (success exit code).
|
||||
return (numResults == 0) ? 1 : 0;
|
||||
// If list pools succeed, we return 0 (success exit code)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue