Repository: phoenix Updated Branches: refs/heads/master 9478d1f2b -> a8238f9bc
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/a8238f9b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a8238f9b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a8238f9b Branch: refs/heads/master Commit: a8238f9bcfd0c091d521f72fa224ba147b0acad3 Parents: 9478d1f Author: Josh Elser <[email protected]> Authored: Mon Nov 23 19:04:56 2015 -0500 Committer: Nick Dimiduk <[email protected]> Committed: Fri Dec 4 16:47:20 2015 -0800 ---------------------------------------------------------------------- bin/sqlline-thin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/a8238f9b/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
