Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0D2FD200C33 for ; Sat, 4 Feb 2017 04:58:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0BC48160B62; Sat, 4 Feb 2017 03:58:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5FC8D160B68 for ; Sat, 4 Feb 2017 04:58:53 +0100 (CET) Received: (qmail 9625 invoked by uid 500); 4 Feb 2017 03:58:52 -0000 Mailing-List: contact commits-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@drill.apache.org Delivered-To: mailing list commits@drill.apache.org Received: (qmail 9437 invoked by uid 99); 4 Feb 2017 03:58:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2017 03:58:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 934B8E0A6B; Sat, 4 Feb 2017 03:58:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: parthc@apache.org To: commits@drill.apache.org Date: Sat, 04 Feb 2017 03:58:55 -0000 Message-Id: In-Reply-To: <1e413bd842d640309b91a23afa65a58f@git.apache.org> References: <1e413bd842d640309b91a23afa65a58f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/8] drill git commit: DRILL-5224: CTTAS: fix errors connected with system path delimiters (Windows) archived-at: Sat, 04 Feb 2017 03:58:54 -0000 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 Authored: Thu Jan 26 20:14:28 2017 +0200 Committer: Parth Chandra 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);