Jim Brennan commented on HADOOP-15357:

[~lmccay], thanks for the review!
{quote}I notice that you decided to not use the get() method itself was this 
due to thinking that we don't need the handleDeprecation stuff?

If so, why do you think we don't need it?
I was thinking that the variables that this function finds are not likely to be 
known constants, and as such cannot be in the deprecated map.   Only the 
prefixed portion is necessarily a known constant.  So it seemed like wasted 
effort to do the deprecated handling.   e.g.: with {{my_prefix[var]=[value]}}, 
would we ever find {{my_prefix[var]}} in the deprecated map?

Looking at it again, I'm not convinced by my own reasoning - I was thinking of 
the MAPREDUCE-7069 use-case, but if this function is used to find a set of 
known properties with a common prefix, it is certainly possible that they could 
require deprecation handling.

I'm inclined to put up a new patch changing this to use get().  Let me know if 
you disagree.

> Configuration.getPropsWithPrefix no longer does variable substitution
> ---------------------------------------------------------------------
>                 Key: HADOOP-15357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15357
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Jim Brennan
>            Assignee: Jim Brennan
>            Priority: Major
>         Attachments: HADOOP-15357.001.patch, HADOOP-15357.002.patch
> Before [HADOOP-13556], Configuration.getPropsWithPrefix() used the 
> Configuration.get() method to get the value of the variables.   After 
> [HADOOP-13556], it now uses props.getProperty().
> The difference is that Configuration.get() does deprecation handling and more 
> importantly variable substitution on the value.  So if a property has a 
> variable specified with ${variable_name}, it will no longer be expanded when 
> retrieved via getPropsWithPrefix().
> Was this change in behavior intentional?  I am using this function in the fix 
> for [MAPREDUCE-7069], but we do want variable expansion to happen.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to