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

Owen O'Malley commented on HADOOP-5000:
---------------------------------------

I think we either need to:
  1. Remove the ability to add InputStreams to Configurations.
  2. Read and store the InputStream as a Map<String,String>.

What is the need for adding InputStreams to configurations?

> A Configuration instance cannot be reloaded if the configuration has 
> InputStream resources
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5000
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5000
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: all
>            Reporter: Alejandro Abdelnur
>
> If a {{Configuration}} instance as a stream resource, on an reload of 
> configuration values, the {{loadResource}} method will fail because the 
> stream has been already read in the first {{loadResource}} invocation.
> For example:
> {code}
> InputStream is = ....
> Configuration conf = new Configuration();
> conf.addResource(is);
> conf.set("a", "A");
> conf.reloadConfiguration();
> conf.set("a","B");
> {code}
> This example will fail on {{conf.set("b", "B");}} because it a 
> {{loadResources()}} will be done and the {{InputStream}} has been already 
> consumed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to