Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CCF891E8 for ; Wed, 15 Feb 2012 22:42:26 +0000 (UTC) Received: (qmail 20790 invoked by uid 500); 15 Feb 2012 22:42:26 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 20747 invoked by uid 500); 15 Feb 2012 22:42:26 -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 20738 invoked by uid 99); 15 Feb 2012 22:42:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 22:42:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 22:42:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BAEF71B9858 for ; Wed, 15 Feb 2012 22:41:59 +0000 (UTC) Date: Wed, 15 Feb 2012 22:41:59 +0000 (UTC) From: "Daryn Sharp (Commented) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <983747539.43087.1329345719766.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1318130100.38430.1329262680269.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-8074) Small bug in hadoop error message for unknown commands 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-8074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13208891#comment-13208891 ] Daryn Sharp commented on HADOOP-8074: ------------------------------------- I guess my request to review got overlooked. FsShell is not designed to enforce a leading dash, it's actually completely generic and it just happens that commands today start with a dash. The more correct patch would have been: {code} --- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShell.java (revision 1242960) +++ hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShell.java (working copy) @@ -251,6 +251,7 @@ if (instance == null) { throw new UnknownCommandException(); } + cmd = instance.getName(); exitCode = instance.run(Arrays.copyOfRange(argv, 1, argv.length)); } catch (IllegalArgumentException e) { displayError(cmd, e.getLocalizedMessage()); @@ -269,7 +270,7 @@ private void displayError(String cmd, String message) { for (String line : message.split("\n")) { - System.err.println(cmd.substring(1) + ": " + line); + System.err.println(cmd + ": " + line); } } {code} > Small bug in hadoop error message for unknown commands > ------------------------------------------------------ > > Key: HADOOP-8074 > URL: https://issues.apache.org/jira/browse/HADOOP-8074 > Project: Hadoop Common > Issue Type: Bug > Components: scripts > Affects Versions: 0.24.0 > Reporter: Eli Collins > Assignee: Colin Patrick McCabe > Priority: Trivial > Fix For: 0.23.2 > > Attachments: HADOOP-8074.txt > > > The hadoop fs command should be more user friendly if the user forgets the dash before the command. Also, this should say "cat" rather than "at". > {noformat} > hadoop-0.24.0-SNAPSHOT $ ./bin/hadoop fs cat > at: Unknown command > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira