Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 14927 invoked from network); 8 Feb 2008 00:11:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2008 00:11:35 -0000 Received: (qmail 16967 invoked by uid 500); 8 Feb 2008 00:11:25 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 16928 invoked by uid 500); 8 Feb 2008 00:11:25 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 16918 invoked by uid 99); 8 Feb 2008 00:11:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 16:11:25 -0800 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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2008 00:11:03 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A63AB714079 for ; Thu, 7 Feb 2008 16:11:11 -0800 (PST) Message-ID: <25359774.1202429471678.JavaMail.jira@brutus> Date: Thu, 7 Feb 2008 16:11:11 -0800 (PST) From: "Robert Chansler (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-2461) Configuration should trim property names and accept decimal, hexadecimal, and octal numbers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Chansler updated HADOOP-2461: ------------------------------------ No special invented formats! I'm persuaded that it is convenient and less error prone to set a file mode to 0777 or to set a length of 0x10000 bytes. How large is the community of the confused if we choose a representation that is in the intersection of C and Java? > Configuration should trim property names and accept decimal, hexadecimal, and octal numbers > ------------------------------------------------------------------------------------------- > > Key: HADOOP-2461 > URL: https://issues.apache.org/jira/browse/HADOOP-2461 > Project: Hadoop Core > Issue Type: Improvement > Components: conf > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > Priority: Minor > Attachments: 2461_20071218.patch > > > I suggest two improvements in reading configuration: > - Suppose we have the following property in a conf file. > {code} > > > testing.property > something > > {code} > Try to get it by > {code} > Configuration conf = new Configuration(); > String value = conf.get("testing.property"); //value == null here > {code} > We will get null since there is an eol in > {code} > > testing.property > {code} > I suggest to trim all property names. > - I also suggest configuration to accept decimal, hexadecimal, and octal numbers (e.g. 011 is 9, 0xA is 10) > It can be easily done by replacing Integer.parseInt(...) with Integer.decode(...) in Configuration.getInt(...), similarly, in Configuration.getLong(...). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.