drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject [5/8] drill git commit: DRILL-5224: CTTAS: fix errors connected with system path delimiters (Windows)
Date Sat, 04 Feb 2017 03:58:55 GMT
DRILL-5224: CTTAS: fix errors connected with system path delimiters (Windows)

This closes #731


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/7913d5d3
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/7913d5d3
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/7913d5d3

Branch: refs/heads/master
Commit: 7913d5d3346087397f8675021807d8b230ba67ca
Parents: 53ca55f
Author: Arina Ielchiieva <arina.yelchiyeva@gmail.com>
Authored: Thu Jan 26 20:14:28 2017 +0200
Committer: Parth Chandra <pchandra@maprtech.com>
Committed: Fri Feb 3 17:42:08 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/drill/exec/rpc/user/UserSession.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/7913d5d3/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
index c3639d2..27bf3e9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
@@ -19,7 +19,6 @@ package org.apache.drill.exec.rpc.user;
 
 import java.io.Closeable;
 import java.io.IOException;
-import java.nio.file.Paths;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -278,7 +277,7 @@ public class UserSession implements Closeable {
    */
   public String registerTemporaryTable(AbstractSchema schema, String tableName) throws IOException
{
       addTemporaryLocation((WorkspaceSchemaFactory.WorkspaceSchema) schema);
-      String temporaryTableName = Paths.get(sessionId, UUID.randomUUID().toString()).toString();
+      String temporaryTableName = new Path(sessionId, UUID.randomUUID().toString()).toUri().getPath();
       String oldTemporaryTableName = temporaryTables.putIfAbsent(tableName.toLowerCase(),
temporaryTableName);
       return oldTemporaryTableName == null ? temporaryTableName : oldTemporaryTableName;
   }
@@ -351,8 +350,8 @@ public class UserSession implements Closeable {
    */
   private void addTemporaryLocation(WorkspaceSchemaFactory.WorkspaceSchema temporaryWorkspace)
throws IOException {
     DrillFileSystem fs = temporaryWorkspace.getFS();
-    Path temporaryLocation = new Path(Paths.get(fs.getUri().toString(),
-        temporaryWorkspace.getDefaultLocation(), sessionId).toString());
+    Path temporaryLocation = new Path(fs.getUri().toString(),
+        new Path(temporaryWorkspace.getDefaultLocation(), sessionId));
 
     FileSystem fileSystem = temporaryLocations.putIfAbsent(temporaryLocation, fs);
 


Mime
View raw message