hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Abdelnur (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-5000) A Configuration instance cannot be reloaded if the configuration has InputStream resources
Date Fri, 09 Jan 2009 07:20:59 GMT
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.


Mime
View raw message