[10/24] git commit: PHOENIX-897 Quote parameters in psql.py
PHOENIX-897 Quote parameters in psql.py Properly quote supplied command-line parameters in psql.py so that it's possible to supply any character (including ones that have special meanings in various shells) as parameters. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f5a49bff Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f5a49bff Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f5a49bff Branch: refs/heads/4.2 Commit: f5a49bff2c43686fc0381f5262de75f504e366ed Parents: 7b57160 Author: Gabriel Reid gabri...@ngdata.com Authored: Mon Oct 27 10:57:43 2014 +0100 Committer: Gabriel Reid gabri...@ngdata.com Committed: Mon Oct 27 10:57:43 2014 +0100 -- bin/psql.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5a49bff/bin/psql.py -- diff --git a/bin/psql.py b/bin/psql.py index a8cbe31..34a95df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -26,11 +26,17 @@ import phoenix_utils phoenix_utils.setPath() +if os.name == 'nt': +args = subprocess.list2cmdline(sys.argv[1:]) +else: +import pipes# pipes module isn't available on Windows +args = .join([pipes.quote(v) for v in sys.argv[1:]]) + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_utils.phoenix_client_jar + \ ' -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, log4j.properties) + \ - org.apache.phoenix.util.PhoenixRuntime + ' '.join(sys.argv[1:]) + org.apache.phoenix.util.PhoenixRuntime + args subprocess.call(java_cmd, shell=True)
[09/15] git commit: PHOENIX-897 Quote parameters in psql.py
PHOENIX-897 Quote parameters in psql.py Properly quote supplied command-line parameters in psql.py so that it's possible to supply any character (including ones that have special meanings in various shells) as parameters. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f4687599 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f4687599 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f4687599 Branch: refs/heads/3.2 Commit: f4687599173427d2b7e71b076aa1e763a062281b Parents: ca6c08f Author: Gabriel Reid gabri...@ngdata.com Authored: Mon Oct 27 10:57:43 2014 +0100 Committer: Gabriel Reid gabri...@ngdata.com Committed: Mon Oct 27 10:58:48 2014 +0100 -- bin/psql.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4687599/bin/psql.py -- diff --git a/bin/psql.py b/bin/psql.py index a8cbe31..34a95df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -26,11 +26,17 @@ import phoenix_utils phoenix_utils.setPath() +if os.name == 'nt': +args = subprocess.list2cmdline(sys.argv[1:]) +else: +import pipes# pipes module isn't available on Windows +args = .join([pipes.quote(v) for v in sys.argv[1:]]) + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_utils.phoenix_client_jar + \ ' -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, log4j.properties) + \ - org.apache.phoenix.util.PhoenixRuntime + ' '.join(sys.argv[1:]) + org.apache.phoenix.util.PhoenixRuntime + args subprocess.call(java_cmd, shell=True)
git commit: PHOENIX-897 Quote parameters in psql.py
Repository: phoenix Updated Branches: refs/heads/4.0 7b5716084 - f5a49bff2 PHOENIX-897 Quote parameters in psql.py Properly quote supplied command-line parameters in psql.py so that it's possible to supply any character (including ones that have special meanings in various shells) as parameters. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f5a49bff Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f5a49bff Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f5a49bff Branch: refs/heads/4.0 Commit: f5a49bff2c43686fc0381f5262de75f504e366ed Parents: 7b57160 Author: Gabriel Reid gabri...@ngdata.com Authored: Mon Oct 27 10:57:43 2014 +0100 Committer: Gabriel Reid gabri...@ngdata.com Committed: Mon Oct 27 10:57:43 2014 +0100 -- bin/psql.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5a49bff/bin/psql.py -- diff --git a/bin/psql.py b/bin/psql.py index a8cbe31..34a95df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -26,11 +26,17 @@ import phoenix_utils phoenix_utils.setPath() +if os.name == 'nt': +args = subprocess.list2cmdline(sys.argv[1:]) +else: +import pipes# pipes module isn't available on Windows +args = .join([pipes.quote(v) for v in sys.argv[1:]]) + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_utils.phoenix_client_jar + \ ' -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, log4j.properties) + \ - org.apache.phoenix.util.PhoenixRuntime + ' '.join(sys.argv[1:]) + org.apache.phoenix.util.PhoenixRuntime + args subprocess.call(java_cmd, shell=True)
git commit: PHOENIX-897 Quote parameters in psql.py
Repository: phoenix Updated Branches: refs/heads/master 79423f801 - 481d1bb87 PHOENIX-897 Quote parameters in psql.py Properly quote supplied command-line parameters in psql.py so that it's possible to supply any character (including ones that have special meanings in various shells) as parameters. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/481d1bb8 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/481d1bb8 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/481d1bb8 Branch: refs/heads/master Commit: 481d1bb878d08fc43fd1eb8f85c36244afdafe45 Parents: 79423f8 Author: Gabriel Reid gabri...@ngdata.com Authored: Mon Oct 27 10:57:43 2014 +0100 Committer: Gabriel Reid gabri...@ngdata.com Committed: Mon Oct 27 10:59:11 2014 +0100 -- bin/psql.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/481d1bb8/bin/psql.py -- diff --git a/bin/psql.py b/bin/psql.py index a8cbe31..34a95df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -26,11 +26,17 @@ import phoenix_utils phoenix_utils.setPath() +if os.name == 'nt': +args = subprocess.list2cmdline(sys.argv[1:]) +else: +import pipes# pipes module isn't available on Windows +args = .join([pipes.quote(v) for v in sys.argv[1:]]) + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_utils.phoenix_client_jar + \ ' -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, log4j.properties) + \ - org.apache.phoenix.util.PhoenixRuntime + ' '.join(sys.argv[1:]) + org.apache.phoenix.util.PhoenixRuntime + args subprocess.call(java_cmd, shell=True)
git commit: PHOENIX-897 Quote parameters in psql.py
Repository: phoenix Updated Branches: refs/heads/3.0 ca6c08f04 - f46875991 PHOENIX-897 Quote parameters in psql.py Properly quote supplied command-line parameters in psql.py so that it's possible to supply any character (including ones that have special meanings in various shells) as parameters. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f4687599 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f4687599 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f4687599 Branch: refs/heads/3.0 Commit: f4687599173427d2b7e71b076aa1e763a062281b Parents: ca6c08f Author: Gabriel Reid gabri...@ngdata.com Authored: Mon Oct 27 10:57:43 2014 +0100 Committer: Gabriel Reid gabri...@ngdata.com Committed: Mon Oct 27 10:58:48 2014 +0100 -- bin/psql.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4687599/bin/psql.py -- diff --git a/bin/psql.py b/bin/psql.py index a8cbe31..34a95df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -26,11 +26,17 @@ import phoenix_utils phoenix_utils.setPath() +if os.name == 'nt': +args = subprocess.list2cmdline(sys.argv[1:]) +else: +import pipes# pipes module isn't available on Windows +args = .join([pipes.quote(v) for v in sys.argv[1:]]) + # HBase configuration folder path (where hbase-site.xml reside) for # HBase/Phoenix client side property override java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_utils.phoenix_client_jar + \ ' -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, log4j.properties) + \ - org.apache.phoenix.util.PhoenixRuntime + ' '.join(sys.argv[1:]) + org.apache.phoenix.util.PhoenixRuntime + args subprocess.call(java_cmd, shell=True)