hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11302) Configuration#set method should honor final properties
Date Mon, 17 Nov 2014 04:51:34 GMT

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

Colin Patrick McCabe commented on HADOOP-11302:

So, the reasoning behind final properties is that you might want to set a configuration key
in one XML file and not have other XML files that are loaded later overwrite that key.  Maybe
I'm missing something, but I don't see why {{Configuration#set}} should honor final properties,
since the same concerns don't apply there.  This is also a highly incompatible change that
will break many people, since final properties in XML files have been around for a long time
with the current behavior.  I'm sure it breaks a lot of our code as well, since there are
places that assume that if the user sets an unreasonable value, the code can set a reasonable
one, and so forth.

> Configuration#set method should honor final properties
> ------------------------------------------------------
>                 Key: HADOOP-11302
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11302
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>            Reporter: Kannan Rajah
>            Assignee: Kannan Rajah
>         Attachments: final-properties.patch
> Configuration class has several methods to add a configuration resource. The
> properties of this resource can override properties of previously added
> resources, unless they were marked final. According to the Javadoc for Configuration.java,
the check for final properties is done
> only while loading resources. But it makes sense to do this check in the set API as well.
Otherwise, users will be able to override final properties set by admin.

This message was sent by Atlassian JIRA

View raw message