drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #1032: DRILL-5089: Dynamically load schema of storage plu...
Date Mon, 13 Nov 2017 22:34:33 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1032#discussion_r150686157
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
---
    @@ -532,7 +572,10 @@ public boolean isMutable() {
         }
     
         public DrillFileSystem getFS() {
    -      return fs;
    +      if (this.fs == null) {
    +        this.fs = ImpersonationUtil.createFileSystem(schemaConfig.getUserName(), fsConf);
    +      }
    +      return this.fs;
    --- End diff --
    
    This class caches the file system, which is good. The other classes in this PR do not;
they create the fs as needed.
    
    Does Calcite allow some kind of session state in which we can cache the fs for the query
(plan) rather than creating it on the fly each time we need it?


---

Mime
View raw message