phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject phoenix git commit: PHOENIX-2448 Fix quoting for sqlline-thin.py on Windows.
Date Sat, 05 Dec 2015 00:49:50 GMT
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 <elserj@apache.org>
Authored: Mon Nov 23 19:04:56 2015 -0500
Committer: Nick Dimiduk <ndimiduk@apache.org>
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
 


Mime
View raw message