You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by gr...@apache.org on 2015/03/26 08:45:17 UTC
phoenix git commit: PHOENIX-1770 Correct exit code from bin scripts
Repository: phoenix
Updated Branches:
refs/heads/4.3 1011488dc -> eeff9bee3
PHOENIX-1770 Correct exit code from bin scripts
Make the python scripts under bin/ exit with the exit code that
was returned from the underlying java command.
Contributed by Mark Tse.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/eeff9bee
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/eeff9bee
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/eeff9bee
Branch: refs/heads/4.3
Commit: eeff9bee36c362746ee89c675de3be13d54a1c9e
Parents: 1011488
Author: Gabriel Reid <ga...@ngdata.com>
Authored: Thu Mar 26 08:43:48 2015 +0100
Committer: Gabriel Reid <ga...@ngdata.com>
Committed: Thu Mar 26 08:43:48 2015 +0100
----------------------------------------------------------------------
bin/end2endTest.py | 3 ++-
bin/performance.py | 13 ++++++++++---
bin/psql.py | 3 ++-
3 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeff9bee/bin/end2endTest.py
----------------------------------------------------------------------
diff --git a/bin/end2endTest.py b/bin/end2endTest.py
index 96886c7..a5993dc 100755
--- a/bin/end2endTest.py
+++ b/bin/end2endTest.py
@@ -44,4 +44,5 @@ java_cmd = "java -cp " + hbase_config_path + os.pathsep + phoenix_jar_path + os.
hbase_library_path + " org.apache.phoenix.end2end.End2EndTestDriver " + \
' '.join(sys.argv[1:])
-subprocess.call(java_cmd, shell=True)
+exitcode = subprocess.call(java_cmd, shell=True)
+sys.exit(exitcode)
http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeff9bee/bin/performance.py
----------------------------------------------------------------------
diff --git a/bin/performance.py b/bin/performance.py
index c69edfd..b9df433 100755
--- a/bin/performance.py
+++ b/bin/performance.py
@@ -85,7 +85,9 @@ print "-----------------------------------------"
print "\nCreating performance table..."
createFileWithContent(ddl, createtable)
-subprocess.call(execute + ddl, shell=True)
+exitcode = subprocess.call(execute + ddl, shell=True)
+if exitcode != 0:
+ sys.exit(exitcode)
# Write real,user,sys time on console for the following queries
queryex("1 - Count", "SELECT COUNT(1) FROM %s;" % (table))
@@ -95,11 +97,16 @@ 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..."
-subprocess.call('java -jar %s %s' % (phoenix_utils.testjar, rowcount), shell=True)
+exitcode = subprocess.call('java -jar %s %s' % (phoenix_utils.testjar, rowcount), shell=True)
+if exitcode != 0:
+ sys.exit(exitcode)
+
print "\n"
createFileWithContent(qry, statements)
-subprocess.call(execute + data + ' ' + qry, shell=True)
+exitcode = subprocess.call(execute + data + ' ' + qry, shell=True)
+if exitcode != 0:
+ sys.exit(exitcode)
# clear temporary files
delfile(ddl)
http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeff9bee/bin/psql.py
----------------------------------------------------------------------
diff --git a/bin/psql.py b/bin/psql.py
index 34a95df..247001a 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -39,4 +39,5 @@ java_cmd = 'java -cp "' + phoenix_utils.hbase_conf_path + os.pathsep + phoenix_u
os.path.join(phoenix_utils.current_dir, "log4j.properties") + \
" org.apache.phoenix.util.PhoenixRuntime " + args
-subprocess.call(java_cmd, shell=True)
+exitcode = subprocess.call(java_cmd, shell=True)
+sys.exit(exitcode)