This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git
The following commit(s) were added to refs/heads/master by this push:
new b204272 PHOENIX-7145 Use embedded client in PQS startup script (#158)
b204272 is described below
commit b204272fc71dd5e21825dee763acd4969a6d241b
Author: Istvan Toth <[email protected]>
AuthorDate: Thu Aug 15 11:11:33 2024 +0200
PHOENIX-7145 Use embedded client in PQS startup script (#158)
---
bin/phoenix_queryserver_utils.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/bin/phoenix_queryserver_utils.py b/bin/phoenix_queryserver_utils.py
index 2d66435..2013873 100755
--- a/bin/phoenix_queryserver_utils.py
+++ b/bin/phoenix_queryserver_utils.py
@@ -77,6 +77,7 @@ def findClasspath(command_name):
return tryDecode(subprocess.Popen(command, shell=True,
stdout=subprocess.PIPE).stdout.read())
def setPath():
+ PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN = "phoenix-client-embedded*.jar"
PHOENIX_CLIENT_JAR_PATTERN = "phoenix-client-*.jar"
OLD_PHOENIX_CLIENT_JAR_PATTERN = "phoenix-*[!n]-client.jar"
PHOENIX_THIN_CLIENT_JAR_PATTERN = "phoenix-queryserver-client-*.jar"
@@ -131,11 +132,16 @@ def setPath():
phoenix_queryserver_classpath = os.path.join(current_dir, "../lib/*")
global phoenix_client_jar
- phoenix_client_jar = find(PHOENIX_CLIENT_JAR_PATTERN, phoenix_class_path)
+ phoenix_client_jar = find(PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN,
phoenix_class_path)
if phoenix_client_jar == "":
- phoenix_client_jar = find(OLD_PHOENIX_CLIENT_JAR_PATTERN,
phoenix_class_path)
+ phoenix_client_jar =
findFileInPathWithoutRecursion(PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN,
os.path.join(current_dir, ".."))
+ if phoenix_client_jar == "":
+ print ("could not find embedded client jar, falling back to old client
variants")
+ phoenix_client_jar = find(PHOENIX_CLIENT_JAR_PATTERN,
phoenix_class_path)
if phoenix_client_jar == "":
phoenix_client_jar =
findFileInPathWithoutRecursion(PHOENIX_CLIENT_JAR_PATTERN,
os.path.join(current_dir, ".."))
+ if phoenix_client_jar == "":
+ phoenix_client_jar = find(OLD_PHOENIX_CLIENT_JAR_PATTERN,
phoenix_class_path)
if phoenix_client_jar == "":
phoenix_client_jar =
findFileInPathWithoutRecursion(OLD_PHOENIX_CLIENT_JAR_PATTERN,
os.path.join(current_dir, ".."))