You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Ahmed Eldawy (JIRA)" <ji...@apache.org> on 2018/04/07 00:35:00 UTC

[jira] [Created] (HDFS-13409) FilterFileSystem#setConf does not update the configuration

Ahmed Eldawy created HDFS-13409:
-----------------------------------

             Summary: FilterFileSystem#setConf does not update the configuration
                 Key: HDFS-13409
                 URL: https://issues.apache.org/jira/browse/HDFS-13409
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Ahmed Eldawy


FilterFileSystem keeps its own copy of Configuration which is separate from the underlying filtered file system. When you call FilterFileSystem#setConf, it updates its own private configuration which is not accessible. When you call FilterFileSystem#getConf, it returns the Configuration of the underlying FileSystem. Please look at the code snippet below.

Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);
FilterFileSystem ffs = new FilterFileSystem(fs);
Configuration conf2 = new Configuration();
conf2.set("foo", "bar");
ffs.setConf(conf2);
assertEquals("bar", ffs.getConf().get("foo")); // This assertion should pass but it fails

 

To solve this problem, we need to implement the following function in FilterFileSystem

@Override

public void setConf(Configuration conf) {
fs.setConf(conf);
}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org