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 #666: DRILL-4956: Temporary tables support
Date Thu, 05 Jan 2017 21:52:42 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/666#discussion_r94826816
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
---
    @@ -54,18 +66,41 @@
       private Map<String, String> properties;
       private OptionManager sessionOptions;
       private final AtomicInteger queryCount;
    +  private final String sessionId;
    +
    +  /** Stores list of temporary tables, key is original table name, value is generated
table name. **/
    +  private final ConcurrentMap<String, String> temporaryTables;
    +  /** Stores list of session temporary locations, key is path to location, value is file
system associated with location. **/
    +  private final ConcurrentMap<Path, FileSystem> temporaryLocations;
    +
    +  /** On session close deletes all session temporary locations recursively. */
    +  @Override
    +  public void close() {
    +    for (Map.Entry<Path, FileSystem> entry : temporaryLocations.entrySet()) {
    +      Path path = entry.getKey();
    +      FileSystem fs = entry.getValue();
    +      try {
    +        fs.delete(path, true);
    +        logger.info("Deleted session temporary location [{}] from file system [{}]",
    +            path.toUri().getPath(), fs.getUri());
    +      } catch (Exception e) {
    +        logger.debug("Error during session temporary location [{}] deletion from file
system [{}]",
    --- End diff --
    
    Should this be error level? The sys admin should be aware that disk space is being consumed
& not released.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message