You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by nd...@apache.org on 2016/01/20 05:51:55 UTC
[1/3] phoenix git commit: PHOENIX-2303 Fix for performance.py not
using JAVA_HOME (bpanneton)
Repository: phoenix
Updated Branches:
refs/heads/master 15432d1ac -> b63ca5fbd
PHOENIX-2303 Fix for performance.py not using JAVA_HOME (bpanneton)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/0b7a3c46
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/0b7a3c46
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/0b7a3c46
Branch: refs/heads/master
Commit: 0b7a3c460e1171b5e67934684bf8ee71f07927cb
Parents: 15432d1
Author: Mujtaba <mu...@apache.org>
Authored: Mon Oct 5 10:57:35 2015 -0700
Committer: Nick Dimiduk <nd...@apache.org>
Committed: Tue Jan 19 20:49:52 2016 -0800
----------------------------------------------------------------------
bin/performance.py | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b7a3c46/bin/performance.py
----------------------------------------------------------------------
diff --git a/bin/performance.py b/bin/performance.py
index 2f7fad1..fe39ddf 100755
--- a/bin/performance.py
+++ b/bin/performance.py
@@ -66,10 +66,40 @@ phoenix_utils.setPath()
# HBase/Phoenix client side property override
hbase_config_path = os.getenv('HBASE_CONF_DIR', phoenix_utils.current_dir)
-execute = ('java -cp "%s%s%s" -Dlog4j.configuration=file:' +
+java_home = os.getenv('JAVA_HOME')
+
+# load hbase-env.??? to extract JAVA_HOME, HBASE_PID_DIR, HBASE_LOG_DIR
+hbase_env_path = None
+hbase_env_cmd = None
+if os.name == 'posix':
+ hbase_env_path = os.path.join(hbase_config_path, 'hbase-env.sh')
+ hbase_env_cmd = ['bash', '-c', 'source %s && env' % hbase_env_path]
+elif os.name == 'nt':
+ hbase_env_path = os.path.join(hbase_config_path, 'hbase-env.cmd')
+ hbase_env_cmd = ['cmd.exe', '/c', 'call %s & set' % hbase_env_path]
+if not hbase_env_path or not hbase_env_cmd:
+ print >> sys.stderr, "hbase-env file unknown on platform %s" % os.name
+ sys.exit(-1)
+
+hbase_env = {}
+if os.path.isfile(hbase_env_path):
+ p = subprocess.Popen(hbase_env_cmd, stdout = subprocess.PIPE)
+ for x in p.stdout:
+ (k, _, v) = x.partition('=')
+ hbase_env[k.strip()] = v.strip()
+
+if hbase_env.has_key('JAVA_HOME'):
+ java_home = hbase_env['JAVA_HOME']
+
+if java_home:
+ java_cmd = os.path.join(java_home, 'bin', 'java')
+else:
+ java_cmd = 'java'
+
+execute = ('%s -cp "%s%s%s" -Dlog4j.configuration=file:' +
os.path.join(phoenix_utils.current_dir, "log4j.properties") +
' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \
- (hbase_config_path, os.pathsep, phoenix_utils.phoenix_client_jar, table, zookeeper)
+ (java_cmd, hbase_config_path, os.pathsep, phoenix_utils.phoenix_client_jar, table, zookeeper)
# Create Table DDL
createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\
@@ -98,7 +128,7 @@ queryex("4 - Truncate + Group By", "SELECT TRUNC(DATE,'DAY') DAY FROM %s GROUP B
queryex("5 - Filter + Count", "SELECT COUNT(1) FROM %s WHERE CORE<10;" % (table))
print "\nGenerating and upserting data..."
-exitcode = subprocess.call('java -jar %s %s %s' % (phoenix_utils.testjar, data, rowcount),
+exitcode = subprocess.call('%s -jar %s %s %s' % (java_cmd, phoenix_utils.testjar, data, rowcount),
shell=True)
if exitcode != 0:
sys.exit(exitcode)
[2/3] phoenix git commit: PHOENIX-2610 Allow passing PHOENIX_OPTS to
command line utils
Posted by nd...@apache.org.
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/master
Commit: 588f449b0bfc5ba6398c30ee76745a78c4996976
Parents: 0b7a3c4
Author: Nick Dimiduk <nd...@apache.org>
Authored: Tue Jan 19 20:17:55 2016 -0800
Committer: Nick Dimiduk <nd...@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" + \
[3/3] phoenix git commit: PHOENIX-2608 Incompatibility between
Jackson1 version shipped with Phoenix, Yarn (Ted Yu)
Posted by nd...@apache.org.
PHOENIX-2608 Incompatibility between Jackson1 version shipped with Phoenix, Yarn (Ted Yu)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b63ca5fb
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b63ca5fb
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b63ca5fb
Branch: refs/heads/master
Commit: b63ca5fbdf60e6dd9a2d0d054c3be058e3b6b5c5
Parents: 588f449
Author: Nick Dimiduk <nd...@apache.org>
Authored: Tue Jan 19 20:20:36 2016 -0800
Committer: Nick Dimiduk <nd...@apache.org>
Committed: Tue Jan 19 20:51:10 2016 -0800
----------------------------------------------------------------------
pom.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b63ca5fb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 72551a4..2c47ca2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,7 +87,7 @@
<commons-cli.version>1.2</commons-cli.version>
<hadoop.version>2.5.1</hadoop.version>
<pig.version>0.13.0</pig.version>
- <jackson.version>1.8.8</jackson.version>
+ <jackson.version>1.9.2</jackson.version>
<antlr.version>3.5</antlr.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.6.4</slf4j.version>
@@ -99,7 +99,6 @@
<commons-csv.version>1.0</commons-csv.version>
<sqlline.version>1.1.8</sqlline.version>
<guava.version>13.0.1</guava.version>
- <jackson.version>1.8.8</jackson.version>
<flume.version>1.4.0</flume.version>
<findbugs.version>1.3.2</findbugs.version>
<jline.version>2.11</jline.version>