This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.1 by this push: new 0b71913c58 PHOENIX-7563 Use HBASE_OPTS as a fallback for PHOENIX_OPTS (#2099) 0b71913c58 is described below commit 0b71913c589ba46ab239b93c04d71274ef735b0d Author: Istvan Toth <st...@apache.org> AuthorDate: Tue Apr 8 11:54:08 2025 +0200 PHOENIX-7563 Use HBASE_OPTS as a fallback for PHOENIX_OPTS (#2099) --- bin/performance.py | 9 ++++++--- bin/psql.py | 11 +++++++---- bin/sqlline.py | 9 ++++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 0b72ff4482..26063427dd 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -65,10 +65,13 @@ phoenix_utils.setPath() java_cmd = phoenix_utils.java -execute = ('%s %s $HBASE_OPTS $PHOENIX_OPTS -cp "%s%s%s%s%s"-Dlog4j2.configurationFile=file:' + - os.path.join(phoenix_utils.current_dir, "log4j2.properties") + +opts = os.getenv('PHOENIX_OPTS') or os.getenv('HBASE_OPTS') or '' + +execute = ('%s %s ' + opts + ' -cp "%s%s%s%s%s%s%s"' + + ('' if '-Dlog4j2.configurationFile' in opts else ' -Dlog4j2.configurationFile=file:' + + os.path.join(phoenix_utils.current_dir, "log4j2.properties")) + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ - (java_cmd, phoenix_utils.jvm_module_flags, hbase_config_path, os.pathsep, + (java_cmd, phoenix_utils.jvm_module_flags, phoenix_utils.hbase_conf_dir, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, table, zookeeper) diff --git a/bin/psql.py b/bin/psql.py index db9ceb7e0f..be04351318 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -30,13 +30,16 @@ phoenix_utils.setPath() args = phoenix_utils.shell_quote(sys.argv[1:]) +opts = os.getenv('PHOENIX_OPTS') or os.getenv('HBASE_OPTS') or '' + java_cmd = phoenix_utils.java + ' ' + phoenix_utils.jvm_module_flags + \ - ' $HBASE_OPTS $PHOENIX_OPTS ' + \ + ' ' + opts + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.hadoop_conf + \ os.pathsep + phoenix_utils.slf4j_backend_jar + \ - os.pathsep + phoenix_utils.logging_jar + \ - os.pathsep + phoenix_utils.phoenix_client_embedded_jar + '" -Dlog4j.configuration=file:' + \ - os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ + os.pathsep + phoenix_utils.logging_jar + '"' + \ + os.pathsep + phoenix_utils.phoenix_client_embedded_jar + \ + ('' if '-Dlog4j2.configurationFile' in opts else ' -Dlog4j2.configurationFile=file:' + + os.path.join(phoenix_utils.current_dir, "log4j2.properties")) + \ " org.apache.phoenix.util.PhoenixRuntime " + args print(java_cmd) diff --git a/bin/sqlline.py b/bin/sqlline.py index ca0e7525c4..aef1888a4a 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -90,15 +90,18 @@ if os.uname()[4].startswith('ppc'): else: disable_jna = "" +opts = os.getenv('PHOENIX_OPTS') or os.getenv('HBASE_OPTS') or '' + java_cmd = phoenix_utils.java + ' ' + phoenix_utils.jvm_module_flags + \ - ' $HBASE_OPTS $PHOENIX_OPTS ' + \ + ' ' + opts + \ ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + \ phoenix_utils.hadoop_conf + os.pathsep + \ phoenix_utils.sqlline_with_deps_jar + os.pathsep + \ phoenix_utils.slf4j_backend_jar + os.pathsep + \ phoenix_utils.logging_jar + os.pathsep + \ - phoenix_utils.phoenix_client_embedded_jar + \ - '" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ + phoenix_utils.phoenix_client_embedded_jar + '"' + \ + ('' if '-Dlog4j2.configurationFile' in opts else ' -Dlog4j2.configurationFile=file:' + + os.path.join(phoenix_utils.current_dir, "log4j2.properties")) + \ disable_jna + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver" + \ (not args.noconnect and " -u " + phoenix_utils.shell_quote([jdbc_url]) or "") + \