Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 1563a54b1 -> ee62ebcde
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/ee62ebcd Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ee62ebcd Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ee62ebcd Branch: refs/heads/4.x-HBase-1.0 Commit: ee62ebcdee2b7ad699ecc98a4e2b5180832b5c3e Parents: 1563a54 Author: Josh Elser <els...@apache.org> Authored: Mon Nov 23 19:04:56 2015 -0500 Committer: Nick Dimiduk <ndimi...@apache.org> Committed: Fri Dec 4 16:48:52 2015 -0800 ---------------------------------------------------------------------- bin/sqlline-thin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/ee62ebcd/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