This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.2 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.2 by this push: new 13a2789eae PHOENIX-7563 Use HBASE_OPTS as a fallback for PHOENIX_OPTS (#2099) 13a2789eae is described below commit 13a2789eae772316931afeef22ed9761612f130d 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 | 8 +++++--- bin/psql.py | 8 +++++--- bin/sqlline.py | 7 +++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 6ef11c2be8..23995354d1 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -65,10 +65,12 @@ phoenix_utils.setPath() java_cmd = phoenix_utils.java -execute = ('%s %s $HBASE_OPTS $PHOENIX_OPTS -cp "%s%s%s%s%s"' + +opts = os.getenv('PHOENIX_OPTS') or os.getenv('HBASE_OPTS') or '' + +execute = ('%s %s ' + opts + ' -cp "%s%s%s%s%s"' + ' -Djava.util.logging.config.class=org.apache.hadoop.hbase.logging.JulToSlf4jInitializer ' + - ' -Dlog4j2.configurationFile=file:' + - os.path.join(phoenix_utils.current_dir, "log4j2.properties") + + ('' 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, phoenix_utils.slf4j_backend_jar, os.pathsep, diff --git a/bin/psql.py b/bin/psql.py index b33b888949..5a558775df 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -30,15 +30,17 @@ 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 + \ '" -Djava.util.logging.config.class=org.apache.hadoop.hbase.logging.JulToSlf4jInitializer ' + \ - ' -Dlog4j2.configurationFile=file:' + \ - os.path.join(phoenix_utils.current_dir, "log4j2.properties") + \ + ('' 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 17bca8fb45..3d9ce1a934 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -90,8 +90,10 @@ 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 + \ @@ -99,7 +101,8 @@ java_cmd = phoenix_utils.java + ' ' + phoenix_utils.jvm_module_flags + \ phoenix_utils.logging_jar + os.pathsep + \ phoenix_utils.phoenix_client_embedded_jar + \ '" -Djava.util.logging.config.class=org.apache.hadoop.hbase.logging.JulToSlf4jInitializer ' + \ - ' -Dlog4j2.configurationFile=file:' + os.path.join(phoenix_utils.current_dir, "log4j2.properties") + \ + ('' 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 "") + \