You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2014/07/21 23:22:40 UTC

[jira] [Resolved] (HDFS-179) hadoop fs -test -d should return different codes for difference cases

     [ https://issues.apache.org/jira/browse/HDFS-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allen Wittenauer resolved HDFS-179.
-----------------------------------

    Resolution: Not a Problem

I'm going to close this as Not a Problem.

fs test works exactly like test and the shell test built-ins work:  0 for success, any other value for failure.  If you want to know whether it exists, or is a file, or is whatever, then you need to specifically test for those conditions.

> hadoop fs -test -d should return different codes for difference cases
> ---------------------------------------------------------------------
>
>                 Key: HDFS-179
>                 URL: https://issues.apache.org/jira/browse/HDFS-179
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Runping Qi
>
> Currently, hadoop fs -test -d path  returns 0 for the case where path is a directory and -1 for all the other cases such as execution errors, path does not exists, and path is a file.
> It is better to use different return codes to differentiate these cases.
> Similar issues also apply to hadoop fs -test -e|z
>   



--
This message was sent by Atlassian JIRA
(v6.2#6252)