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

Jason Lowe commented on HADOOP-15973:
-------------------------------------

Thanks for the patch!

I'm not sure returning the full properties is correct.  IIUC that will snapshot 
not only the properties that were loaded as part of parsing the input stream 
but also all previously loaded properties from prior resources.  That will 
cause problems if a previously parsed resource is changed and the user tries to 
refresh configs, as this snapshot will have old property values from that 
resource that could clobber the new values trying to be refreshed.

As I understand it, we need input streams to cache what was loaded from the 
input stream, including anything loaded from include directives found in that 
stream, and nothing else.  It appears the bug is in 
Configuration.Parser#handleInclude since any properties loaded via an include 
are not returned in the list of properties returned as a result of the parse 
method.  If those were included in {{results}} then I think we'd cache the 
proper amount which is what was found as a result of a full parse of the input 
stream.

> Configuration: Included properties are not cached if resource is a stream
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-15973
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15973
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Eric Payne
>            Assignee: Eric Payne
>            Priority: Critical
>         Attachments: HADOOP-15973.001.patch
>
>
> If a configuration resource is a bufferedinputstream and the resource has an 
> included xml file, the properties from the included file are read and stored 
> in the properties of the configuration, but they are not stored in the 
> resource cache. So, if a later resource is added to the config and the 
> properties are recalculated from the first resource, the included properties 
> are lost.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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