Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 50394 invoked from network); 26 Aug 2009 22:25:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 22:25:24 -0000 Received: (qmail 92199 invoked by uid 500); 26 Aug 2009 22:25:24 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 92130 invoked by uid 500); 26 Aug 2009 22:25:24 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 91825 invoked by uid 99); 26 Aug 2009 22:25:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:25:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:25:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 81B56234C04C for ; Wed, 26 Aug 2009 15:24:59 -0700 (PDT) Message-ID: <668717721.1251325499530.JavaMail.jira@brutus> Date: Wed, 26 Aug 2009 15:24:59 -0700 (PDT) From: "Ravi Phulari (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Updated: (HADOOP-6143) FS shell commands returns incorrect exit code when error occurs In-Reply-To: <636161787.1247269154845.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi Phulari updated HADOOP-6143: --------------------------------- Attachment: HADOOP-6143-1.patch > FS shell commands returns incorrect exit code when error occurs > ---------------------------------------------------------------- > > Key: HADOOP-6143 > URL: https://issues.apache.org/jira/browse/HADOOP-6143 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Reporter: Ravi Phulari > Assignee: Ravi Phulari > Attachments: HADOOP-6143-1.patch, HADOOP-6143.patch > > > HDFS documentation ( http://hadoop.apache.org/core/docs/current/hdfs_shell.html#du ) mentions that > {noformat} > Exit Code: > Returns 0 on success and -1 on error. > {noformat} > Current Fs shell behavior is buggy with this agreement. > {code} > statepick-lm:Hadoop rphulari$ bin/hadoop fs -ls foo > ls: Cannot access foo: No such file or directory. > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -lsr foo > lsr: Cannot access foo: No such file or directory. > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -du foo > du: Cannot access foo: No such file or directory. > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -dus foo > dus: Cannot access foo: No such file or directory. > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -cp foo f2 > cp: File does not exist: foo > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -copyToLocal foo f2 > copyToLocal: null > statepick-lm:Hadoop rphulari$ echo $? > 255 > statepick-lm:Hadoop rphulari$ bin/hadoop fs -copyFromLocal foo f2 > copyFromLocal: File foo does not exist. > statepick-lm:Hadoop rphulari$ echo $? > 255 > {code} > In all above cases exit code on error should be -1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.