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

Daryn Sharp commented on HADOOP-11518:
--------------------------------------

Only changing the get side creates some odd semantics.  It would be a bit 
jarring to get a key (which was prefix overridden), set it, get it again and 
not see the change from the set.  Ex. I get a conf with prefix "daryn".  The 
conf has "mykey=1", and "daryn.mykey=2".  Get "mykey" returns 2 from 
"daryn.mykey".  I set "mykey=3" which overwrites "mykey", so when I get "mykey" 
again, I still see 2 from "daryn.mykey".

I'm not sure if it works consistently with -D properties.

A simple low risk/though approach to consider may be using 
{{Configuration#getValByRegex}} in a ctor to shift all the kvps with the prefix 
down to their non-prefixed keys.

> Prefix-based per-RPC server configuration
> -----------------------------------------
>
>                 Key: HADOOP-11518
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11518
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>            Reporter: Kihwal Lee
>            Assignee: Kihwal Lee
>         Attachments: HADOOP-11518.patch, HADOOP-11518.v2.patch
>
>
> If a process runs multiple RPC servers, there is no way to individually set 
> their IPC parameters beyond what's supported by the RPC Builder.  If a 
> configuration is shared among many nodes, this is more problematic. 
> In this jira, a prefix-based per-server configuration is proposed.  When an 
> RPC server is built, a prefix can be specified, which will then be prepended 
> to keys when retrieving configured values.  There will be an option to 
> fall-back to using the key without the prefix when no value is found with the 
> prefix, thus making this feature compatible with the current way of 
> configuring servers.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to