You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Alejandro Abdelnur (Commented) (JIRA)" <ji...@apache.org> on 2012/03/13 17:46:42 UTC

[jira] [Commented] (HADOOP-8167) Configuration deprecation logic breaks backwards compatibility

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

Alejandro Abdelnur commented on HADOOP-8167:
--------------------------------------------

Options that I see to address this:

1* set(dK, V) should store (dK, V) and get(nK) should do a reverse look up if nK is not found

ISSUE: This may break new code that iterates and expects nK in the iterator.

2* set(dK, V) & set(nK, V) should store both (dK, V) and (nK, V)

ISSUE: increases the number of stored key/values.

3* keep current set/get logic and make iterator() to return 'duplicated' entries for deprecated values (dK, V) & (nK, V)

ISSUE: complexity in the iterator logic as well.

4* keep track in Configuration of the key used regardless of being deprecated or not and return those on iterators()

ISSUE: it will require Configuration to have an additional data structure to keep track of deprecate values being used. This will add more complexity to the configuration.


I'm inclined to do either #2 or #3.

Thoughts?
                
> Configuration deprecation logic breaks backwards compatibility
> --------------------------------------------------------------
>
>                 Key: HADOOP-8167
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8167
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 0.24.0, 0.23.3
>            Reporter: Alejandro Abdelnur
>            Assignee: Alejandro Abdelnur
>            Priority: Blocker
>             Fix For: 0.23.3
>
>
> The deprecated Configuration logic works as follows:
> For a dK deprecated key in favor of nK:
> * on set(dK, V), it stores (nK,V)
> * on get(dK) it does a reverseLookup of dK to nK and looks for get(nK)
> While this works fine for single set/get operations, the iterator() method that returns an iterator of all config key/values, returns only the new keys.
> This breaks applications that did a set(dK, V) and expect, when iterating over the configuration to find (dK, V).

--
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