PHOENIX-2610 Allow passing PHOENIX_OPTS to command line utils
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/588f449b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/588f449b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/588f449b Branch: refs/heads/calcite Commit: 588f449b0bfc5ba6398c30ee76745a78c4996976 Parents: 0b7a3c4 Author: Nick Dimiduk <ndimi...@apache.org> Authored: Tue Jan 19 20:17:55 2016 -0800 Committer: Nick Dimiduk <ndimi...@apache.org> Committed: Tue Jan 19 20:50:37 2016 -0800 ---------------------------------------------------------------------- bin/performance.py | 2 +- bin/phoenix_sandbox.py | 2 +- bin/psql.py | 3 ++- bin/queryserver.py | 2 +- bin/sqlline-thin.py | 3 ++- bin/sqlline.py | 3 ++- bin/traceserver.py | 3 ++- 7 files changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/performance.py ---------------------------------------------------------------------- diff --git a/bin/performance.py b/bin/performance.py index fe39ddf..c16dd5a 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -96,7 +96,7 @@ if java_home: else: java_cmd = 'java' -execute = ('%s -cp "%s%s%s" -Dlog4j.configuration=file:' + +execute = ('%s $PHOENIX_OPTS -cp "%s%s%s" -Dlog4j.configuration=file:' + os.path.join(phoenix_utils.current_dir, "log4j.properties") + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ (java_cmd, hbase_config_path, os.pathsep, phoenix_utils.phoenix_client_jar, table, zookeeper) http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/phoenix_sandbox.py ---------------------------------------------------------------------- diff --git a/bin/phoenix_sandbox.py b/bin/phoenix_sandbox.py index 433bc98..4279dd6 100755 --- a/bin/phoenix_sandbox.py +++ b/bin/phoenix_sandbox.py @@ -43,7 +43,7 @@ cp_components = [phoenix_target_dir + "/*"] with open(cp_file_path, 'rb') as cp_file: cp_components.append(cp_file.read()) -java_cmd = ("java -Dlog4j.configuration=file:%s " + +java_cmd = ("java $PHOENIX_OPTS -Dlog4j.configuration=file:%s " + "-cp %s org.apache.phoenix.Sandbox") % ( logging_config, ":".join(cp_components)) http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/psql.py ---------------------------------------------------------------------- diff --git a/bin/psql.py b/bin/psql.py index d4269d1..973d3de 100755 --- a/bin/psql.py +++ b/bin/psql.py @@ -62,7 +62,8 @@ if java_home: else: java = 'java' -java_cmd = java +' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + \ +java_cmd = java + ' $PHOENIX_OPTS ' + \ + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + \ os.pathsep + phoenix_utils.hadoop_conf + os.pathsep + phoenix_utils.hadoop_classpath + '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " org.apache.phoenix.util.PhoenixRuntime " + args http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/queryserver.py ---------------------------------------------------------------------- diff --git a/bin/queryserver.py b/bin/queryserver.py index 78d340c..d4228b3 100755 --- a/bin/queryserver.py +++ b/bin/queryserver.py @@ -119,7 +119,7 @@ else: # " -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " + \ # " -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \ -java_cmd = '%(java)s -cp ' + hbase_config_path + os.pathsep + hadoop_config_path + os.pathsep + \ +java_cmd = '%(java)s $PHOENIX_OPTS -cp ' + hbase_config_path + os.pathsep + hadoop_config_path + os.pathsep + \ phoenix_utils.phoenix_queryserver_jar + os.pathsep + phoenix_utils.phoenix_client_jar + \ " -Dproc_phoenixserver" + \ " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/sqlline-thin.py ---------------------------------------------------------------------- diff --git a/bin/sqlline-thin.py b/bin/sqlline-thin.py index d17d756..b37cd90 100755 --- a/bin/sqlline-thin.py +++ b/bin/sqlline-thin.py @@ -145,7 +145,8 @@ if java_home: else: java = 'java' -java_cmd = java + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_thin_client_jar + \ +java_cmd = java + ' $PHOENIX_OPTS ' + \ + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_thin_client_jar + \ os.pathsep + phoenix_utils.hadoop_conf + os.pathsep + phoenix_utils.hadoop_classpath + '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " sqlline.SqlLine -d org.apache.phoenix.queryserver.client.Driver " + \ http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/sqlline.py ---------------------------------------------------------------------- diff --git a/bin/sqlline.py b/bin/sqlline.py index d1fdf74..f14cfc7 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -87,7 +87,8 @@ colorSetting = "true" if os.name == 'nt': colorSetting = "false" -java_cmd = java + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + os.pathsep + phoenix_utils.hadoop_common_jar + os.pathsep + phoenix_utils.hadoop_hdfs_jar + \ +java_cmd = java + ' $PHOENIX_OPTS ' + \ + ' -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + os.pathsep + phoenix_utils.hadoop_common_jar + os.pathsep + phoenix_utils.hadoop_hdfs_jar + \ os.pathsep + phoenix_utils.hadoop_conf + os.pathsep + phoenix_utils.hadoop_classpath + '" -Dlog4j.configuration=file:' + \ os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver \ http://git-wip-us.apache.org/repos/asf/phoenix/blob/588f449b/bin/traceserver.py ---------------------------------------------------------------------- diff --git a/bin/traceserver.py b/bin/traceserver.py index 082b417..665099e 100755 --- a/bin/traceserver.py +++ b/bin/traceserver.py @@ -116,7 +116,8 @@ else: # " -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n " + \ # " -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true" + \ -java_cmd = '%(java)s -cp ' + hbase_config_path + os.pathsep + phoenix_utils.phoenix_traceserver_jar + os.pathsep + phoenix_utils.phoenix_client_jar + \ +java_cmd = '%(java)s $PHOENIX_OPTS ' + \ + '-cp ' + hbase_config_path + os.pathsep + phoenix_utils.phoenix_traceserver_jar + os.pathsep + phoenix_utils.phoenix_client_jar + \ " -Dproc_phoenixtraceserver" + \ " -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \ " -Dpsql.root.logger=%(root_logger)s" + \