You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Owen O'Malley (JIRA)" <ji...@apache.org> on 2008/02/07 23:03:07 UTC
[jira] Commented: (HADOOP-2461) Configuration should trim property
names and accept decimal, hexadecimal, and octal numbers
[ https://issues.apache.org/jira/browse/HADOOP-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566815#action_12566815 ]
Owen O'Malley commented on HADOOP-2461:
---------------------------------------
I think removing white space from the start and end of the values is a good thing. I'm pretty skeptical of using hexadecimal and octal numbers. I think it will confuse users a lot if 010 == 8.
> 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}
> <property>
> <name>
> testing.property</name>
> <value>something</value>
> </property>
> {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}
> <name>
> testing.property</name>
> {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.