Skip to content

Commit

Permalink
PHOENIX-7145 Use embedded client in PQS startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
stoty committed Jul 26, 2024
1 parent 160c800 commit 7ea6385
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/phoenix_queryserver_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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, ".."))

Expand Down

0 comments on commit 7ea6385

Please sign in to comment.