Return-Path: X-Original-To: apmail-phoenix-commits-archive@minotaur.apache.org Delivered-To: apmail-phoenix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 978A11857B for ; Sat, 5 Dec 2015 00:49:53 +0000 (UTC) Received: (qmail 99582 invoked by uid 500); 5 Dec 2015 00:49:50 -0000 Delivered-To: apmail-phoenix-commits-archive@phoenix.apache.org Received: (qmail 99543 invoked by uid 500); 5 Dec 2015 00:49:50 -0000 Mailing-List: contact commits-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list commits@phoenix.apache.org Received: (qmail 99534 invoked by uid 99); 5 Dec 2015 00:49:50 -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, 05 Dec 2015 00:49:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63334E08EF; Sat, 5 Dec 2015 00:49:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ndimiduk@apache.org To: commits@phoenix.apache.org Message-Id: <45e9a9a81af447f791c133d2e255d503@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: phoenix git commit: PHOENIX-2448 Fix quoting for sqlline-thin.py on Windows. Date: Sat, 5 Dec 2015 00:49:50 +0000 (UTC) Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 4d01f28eb -> 41e79d5be PHOENIX-2448 Fix quoting for sqlline-thin.py on Windows. Also fix the use of "hbase" instead of "hbase.cmd" on Windows. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/41e79d5b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/41e79d5b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/41e79d5b Branch: refs/heads/4.x-HBase-0.98 Commit: 41e79d5be22872cb79919d58d4668f89ac6947e7 Parents: 4d01f28 Author: Josh Elser Authored: Mon Nov 23 19:04:56 2015 -0500 Committer: Nick Dimiduk Committed: Fri Dec 4 16:49:06 2015 -0800 ---------------------------------------------------------------------- bin/sqlline-thin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/41e79d5b/bin/sqlline-thin.py ---------------------------------------------------------------------- diff --git a/bin/sqlline-thin.py b/bin/sqlline-thin.py index 2e237ed..d17d756 100755 --- a/bin/sqlline-thin.py +++ b/bin/sqlline-thin.py @@ -57,7 +57,15 @@ def cleanup_url(url): def get_serialization(): default_serialization='PROTOBUF' env=os.environ.copy() - hbase_cmd = phoenix_utils.which('hbase') + if os.name == 'posix': + hbase_exec_name = 'hbase' + elif os.name == 'nt': + hbase_exec_name = 'hbase.cmd' + else: + print 'Unknown platform "%s", defaulting to HBase executable of "hbase"' % os.name + hbase_exec_name = 'hbase' + + hbase_cmd = phoenix_utils.which(hbase_exec_name) if hbase_cmd is None: print 'Failed to find hbase executable on PATH, defaulting serialization to %s.' % default_serialization return default_serialization @@ -141,7 +149,7 @@ java_cmd = java + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix os.pathsep + phoenix_utils.hadoop_conf + os.pathsep + phoenix_utils.hadoop_classpath + '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " sqlline.SqlLine -d org.apache.phoenix.queryserver.client.Driver " + \ - " -u jdbc:phoenix:thin:url='" + url + ";serialization=" + serialization + "'" + \ + " -u \"jdbc:phoenix:thin:url=" + url + ";serialization=" + serialization + "\"" + \ " -n none -p none --color=" + colorSetting + " --fastConnect=false --verbose=true " + \ " --isolation=TRANSACTION_READ_COMMITTED " + sqlfile