hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hong Tang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6711) Configuration should support list of values
Date Fri, 16 Apr 2010 18:06:26 GMT

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

Hong Tang commented on HADOOP-6711:

A word of caution: the proposed implementation using string concatenation is inefficient when
a user wants to add a lot of items on the list. I have been hit by this before when using

> Configuration should support list of values
> -------------------------------------------
>                 Key: HADOOP-6711
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6711
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: conf
>            Reporter: Amar Kamat
> Configuration supports 2 operations namely _set()_ and _get()_. It would be nice to have
an inbuild support for lists where there can be multiple values (i.e list of values) assigned
to one key. A workaround could be
> {code}
> // Assume Key be the parameter key and newValue be the value to be added/appended
> Configuration c = new Configuration();
> String value = c.get(Key);
> value = value + " " + newValue
> c.set(Key, value);
> {code}
> One common usecase is that in a production enviroment, some user facing params (e.g mapred.child.java.opts)
are set to default values (say for performance reasons). Users themselves might want to *add*
to this list. Doing a set would overwrite the previous values. The above mentioned hack is
doable via code but not via command line. Hence we need the framework to support lists.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message