Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/796#discussion_r108049396
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/DrillFileSystem.java
 ---
    @@ -89,22 +89,36 @@ public DrillFileSystem(Configuration fsConf) throws 
IOException {
       }
     
       public DrillFileSystem(Configuration fsConf, OperatorStats 
operatorStats) throws IOException {
    -    this.underlyingFs = FileSystem.get(fsConf);
    +    this(fsConf, URI.create(fsConf.getRaw(FS_DEFAULT_NAME_KEY)), 
operatorStats);
    +  }
    +
    +  public DrillFileSystem(Configuration fsConf, URI Uri, OperatorStats 
operatorStats) throws IOException {
    +    this.underlyingFs = FileSystem.get(Uri, fsConf);
    +    logger.trace("Configuration for the DrillFileSystem " + 
fsConf.getRaw(FS_DEFAULT_NAME_KEY) +
    +        ", underlyingFs: " + this.underlyingFs.getUri());
         this.codecFactory = new CompressionCodecFactory(fsConf);
         this.operatorStats = operatorStats;
    +    setConf(fsConf);
       }
     
       @Override
       public void setConf(Configuration conf) {
         // Guard against setConf(null) call that is called as part of 
superclass constructor (Configured) of the
         // DrillFileSystem, at which point underlyingFs is null.
    -    if (conf != null && underlyingFs != null) {
    -      underlyingFs.setConf(conf);
    +    if(conf != null) {
    +      super.setConf(conf);
    +      if (underlyingFs != null && underlyingFs.getConf() == null) {
    +        underlyingFs.setConf(conf);
    +      }
    +
         }
       }
     
       @Override
       public Configuration getConf() {
    +    if (super.getConf() != null) {
    --- End diff --
    
    Shouldn't the base class config and the underlying FS config be the same? 
If they differ, how do we have any idea which is the correct one? In what 
situation would we want the base class config but not the underlying FS config?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to