hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Chu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11277) hdfs dfs test command "returning 0 if true." instead of what should be "returning 1 if true."
Date Thu, 06 Nov 2014 23:11:33 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14201164#comment-14201164
] 

Stephen Chu commented on HADOOP-11277:
--------------------------------------

Yeah, in typical code 1 == true and 0 == false, but the Hadoop commands follow the unix exit
code conventions, where 0 means the command was successful and non-zero means otherwise.

In this scenario, when we run {{hadoop fs -test -e}} on a file that exists, then the exit
code is 0, meaning that the existence test ran successfully.

> hdfs dfs test command  "returning 0 if true." instead of what should be "returning 1
if true."
> ----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11277
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11277
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.5.0
>            Reporter: DeepakVohra
>
> The CDH5 File System (FS) shell commands documentation has an error. The test command
lists  "returning 0 if true."  for all options. Should be "returning 1 if true."
> http://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-common/FileSystemShell.html#ls



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message