You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by je...@apache.org on 2014/02/19 02:11:30 UTC
git commit: Revert "convert bash shell script to python script".
Checkin wrongly.
Repository: incubator-phoenix
Updated Branches:
refs/heads/master 26ee0e087 -> fcc987f9b
Revert "convert bash shell script to python script". Checkin wrongly.
This reverts commit 26ee0e087ef3664ac73361c146df468d652c1da6.
Project: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/commit/fcc987f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/tree/fcc987f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/diff/fcc987f9
Branch: refs/heads/master
Commit: fcc987f9bd057eb261ef6d653cd362f42c293556
Parents: 26ee0e0
Author: Jeffrey Zhong <jz...@JZhongs-MacBook-Pro.local>
Authored: Tue Feb 18 17:13:01 2014 -0800
Committer: Jeffrey Zhong <jz...@JZhongs-MacBook-Pro.local>
Committed: Tue Feb 18 17:13:01 2014 -0800
----------------------------------------------------------------------
bin/csv-bulk-loader.py | 60 ---------------------
bin/csv-bulk-loader.sh | 38 +++++++++++++
bin/performance.py | 129 --------------------------------------------
bin/performance.sh | 93 ++++++++++++++++++++++++++++++++
bin/psql.py | 47 ----------------
bin/psql.sh | 30 +++++++++++
bin/sqlline.py | 59 --------------------
bin/sqlline.sh | 37 +++++++++++++
bin/upgradeTo2.sh | 30 +++++++++++
9 files changed, 228 insertions(+), 295 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/csv-bulk-loader.py
----------------------------------------------------------------------
diff --git a/bin/csv-bulk-loader.py b/bin/csv-bulk-loader.py
deleted file mode 100755
index 028bbff..0000000
--- a/bin/csv-bulk-loader.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-############################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-############################################################################
-
-# commandline-options
-# -i CSV data file path in hdfs (mandatory)
-# -s Phoenix schema name (mandatory if table is
-# created without default phoenix schema name)
-# -t Phoenix table name (mandatory)
-# -sql Phoenix create table ddl path (mandatory)
-# -zk Zookeeper IP:<port> (mandatory)
-# -hd HDFS NameNode IP:<port> (mandatory)
-# -mr MapReduce Job Tracker IP:<port> (mandatory)
-# -o Output directory path in hdfs (optional)
-# -idx Phoenix index table name (optional, index
-# support is yet to be added)
-# -error Ignore error while reading rows from CSV ?
-# (1 - YES | 0 - NO, defaults to 1) (optional)
-# -help Print all options (optional)
-
-import os
-import subprocess
-import fnmatch
-import sys
-
-
-def find(pattern, path):
- for root, dirs, files in os.walk(path):
- for name in files:
- if fnmatch.fnmatch(name, pattern):
- return os.path.join(root, name)
- return ""
-
-current_dir = os.path.dirname(os.path.abspath(__file__))
-phoenix_jar_path = os.path.join(current_dir, "..", "phoenix-assembly",
- "target")
-phoenix_client_jar = find("phoenix-*-client.jar", phoenix_jar_path)
-
-java_cmd = """java -cp ".:""" + phoenix_client_jar +\
- """" org.apache.phoenix.map.reduce.CSVBulkLoader """ +\
- ' '.join(sys.argv[1:])
-
-subprocess.call(java_cmd, shell=True)
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/csv-bulk-loader.sh
----------------------------------------------------------------------
diff --git a/bin/csv-bulk-loader.sh b/bin/csv-bulk-loader.sh
new file mode 100755
index 0000000..05aed2b
--- /dev/null
+++ b/bin/csv-bulk-loader.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+############################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+# Phoenix client jar. To generate new jars: $ mvn package -DskipTests
+
+# commandline-options
+# -i CSV data file path in hdfs (mandatory)
+# -s Phoenix schema name (mandatory if table is created without default phoenix schema name)
+# -t Phoenix table name (mandatory)
+# -sql Phoenix create table ddl path (mandatory)
+# -zk Zookeeper IP:<port> (mandatory)
+# -hd HDFS NameNode IP:<port> (mandatory)
+# -mr MapReduce Job Tracker IP:<port> (mandatory)
+# -o Output directory path in hdfs (optional)
+# -idx Phoenix index table name (optional, index support is yet to be added)
+# -error Ignore error while reading rows from CSV ? (1 - YES | 0 - NO, defaults to 1) (optional)
+# -help Print all options (optional)
+
+phoenix_client_jar=$(find ../phoenix-assembly/target/phoenix-*-client.jar)
+java -cp "$phoenix_client_jar" org.apache.phoenix.map.reduce.CSVBulkLoader "$@"
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/performance.py
----------------------------------------------------------------------
diff --git a/bin/performance.py b/bin/performance.py
deleted file mode 100755
index 8d40399..0000000
--- a/bin/performance.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-############################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-############################################################################
-
-import os
-import subprocess
-import fnmatch
-import sys
-
-
-def find(pattern, path):
- for root, dirs, files in os.walk(path):
- for name in files:
- if fnmatch.fnmatch(name, pattern):
- return os.path.join(root, name)
- return ""
-
-
-def queryex(statments, description, statment):
- print "Query # %s - %s" % (description, statment)
- statements = statments + statment
-
-
-def delfile(filename):
- if os.path.exists(filename):
- os.remove(filename)
-
-
-def usage():
- print "Performance script arguments not specified. Usage: performance.sh \
-<zookeeper> <row count>"
- print "Example: performance.sh localhost 100000"
-
-
-def createFileWithContent(filename, content):
- fo = open(filename, "w+")
- fo.write(content)
- fo.close()
-
-if len(sys.argv) < 3:
- usage()
- sys.exit()
-
-# command line arguments
-zookeeper = sys.argv[1]
-rowcount = sys.argv[2]
-table = "performance_" + sys.argv[2]
-
-# helper variable and functions
-ddl = "ddl.sql"
-data = "data.csv"
-qry = "query.sql"
-statements = ""
-
-current_dir = os.path.dirname(os.path.abspath(__file__))
-phoenix_jar_path = os.path.join(current_dir, "..", "phoenix-assembly",
- "target")
-phoenix_client_jar = find("phoenix-*-client.jar", phoenix_jar_path)
-phoenix_test_jar_path = os.path.join(current_dir, "..", "phoenix-core",
- "target")
-testjar = find("phoenix-*-tests.jar", phoenix_test_jar_path)
-
-
-# HBase configuration folder path (where hbase-site.xml reside) for
-# HBase/Phoenix client side property override
-hbase_config_path = os.getenv('HBASE_CONF_DIR', current_dir)
-
-execute = 'java -cp "%s:%s" -Dlog4j.configuration=file:' + \
- os.path.join(current_dir, "log4j.properties") + \
- 'log4j.properties org.apache.phoenix.util.PhoenixRuntime -t %s %s ' % \
- (hbase_config_path, phoenix_client_jar, table, zookeeper)
-
-
-# Create Table DDL
-createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\
-DOMAIN VARCHAR NOT NULL, FEATURE VARCHAR NOT NULL,DATE DATE NOT NULL,\
-USAGE.CORE BIGINT,USAGE.DB BIGINT,STATS.ACTIVE_VISITOR \
-INTEGER CONSTRAINT PK PRIMARY KEY (HOST, DOMAIN, FEATURE, DATE)) \
-SPLIT ON ('CSGoogle','CSSalesforce','EUApple','EUGoogle','EUSalesforce',\
-'NAApple','NAGoogle','NASalesforce');" % (table)
-
-# generate and upsert data
-print "Phoenix Performance Evaluation Script 1.0"
-print "-----------------------------------------"
-
-print "\nCreating performance table..."
-createFileWithContent(ddl, createtable)
-
-subprocess.call(execute + ddl, shell=True)
-
-# Write real,user,sys time on console for the following queries
-queryex(statements, "1 - Count", "SELECT COUNT(1) FROM %s;" % (table))
-queryex(statements, "2 - Group By First PK", "SELECT HOST FROM %s GROUP \
-BY HOST;" % (table))
-queryex(statements, "3 - Group By Second PK", "SELECT DOMAIN FROM %s GROUP \
-BY DOMAIN;" % (table))
-queryex(statements, "4 - Truncate + Group By", "SELECT TRUNC(DATE,'DAY') DAY \
-FROM %s GROUP BY TRUNC(DATE,'DAY');" % (table))
-queryex(statements, "5 - Filter + Count", "SELECT COUNT(1) FROM %s WHERE \
-CORE<10;" % (table))
-
-print "\nGenerating and upserting data..."
-subprocess.call('java -jar %s %s' % (testjar, rowcount), shell=True)
-print "\n"
-createFileWithContent(qry, statements)
-
-subprocess.call(execute + data + ' ' + qry, shell=True)
-
-# clear temporary files
-delfile(ddl)
-delfile(data)
-delfile(qry)
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/performance.sh
----------------------------------------------------------------------
diff --git a/bin/performance.sh b/bin/performance.sh
new file mode 100755
index 0000000..b08262c
--- /dev/null
+++ b/bin/performance.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+############################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+# Note: This script is tested on Linux environment only. It should work on any Unix platform but is not tested.
+
+
+# command line arguments
+zookeeper=$1
+rowcount=$2
+table="performance_$2"
+
+# helper variable and functions
+ddl="ddl.sql"
+data="data.csv"
+qry="query.sql"
+statements=""
+
+# Phoenix client jar. To generate new jars: $ mvn package -DskipTests
+current_dir=$(cd $(dirname $0);pwd)
+phoenix_jar_path="$current_dir/../phoenix-assembly/target"
+phoenix_client_jar=$(find $phoenix_jar_path/phoenix-*-client.jar)
+testjar="$current_dir/../phoenix-core/target/phoenix-*-tests.jar"
+
+# HBase configuration folder path (where hbase-site.xml reside) for HBase/Phoenix client side property override
+hbase_config_path="$current_dir"
+
+execute="java -cp "$hbase_config_path:$phoenix_client_jar" -Dlog4j.configuration=file:$current_dir/log4j.properties org.apache.phoenix.util.PhoenixRuntime -t $table $zookeeper "
+function usage {
+ echo "Performance script arguments not specified. Usage: performance.sh <zookeeper> <row count>"
+ echo "Example: performance.sh localhost 100000"
+ exit
+}
+
+function queryex {
+ echo "Query # $1 - $2"
+ statements="$statements$2"
+}
+function cleartempfiles {
+ delfile $ddl
+ delfile $data
+ delfile $qry
+}
+function delfile {
+ if [ -f $1 ]; then rm $1 ;fi;
+}
+
+# Create Table DDL
+createtable="CREATE TABLE IF NOT EXISTS $table (HOST CHAR(2) NOT NULL,DOMAIN VARCHAR NOT NULL,
+FEATURE VARCHAR NOT NULL,DATE DATE NOT NULL,USAGE.CORE BIGINT,USAGE.DB BIGINT,STATS.ACTIVE_VISITOR
+INTEGER CONSTRAINT PK PRIMARY KEY (HOST, DOMAIN, FEATURE, DATE))
+SPLIT ON ('CSGoogle','CSSalesforce','EUApple','EUGoogle','EUSalesforce','NAApple','NAGoogle','NASalesforce');"
+
+# generate and upsert data
+clear
+echo "Phoenix Performance Evaluation Script 1.0";echo "-----------------------------------------"
+if [ -z "$2" ]
+then usage; fi;
+echo ""; echo "Creating performance table..."
+echo $createtable > $ddl; $execute "$ddl"
+
+# Write real,user,sys time on console for the following queries
+queryex "1 - Count" "SELECT COUNT(1) FROM $table;"
+queryex "2 - Group By First PK" "SELECT HOST FROM $table GROUP BY HOST;"
+queryex "3 - Group By Second PK" "SELECT DOMAIN FROM $table GROUP BY DOMAIN;"
+queryex "4 - Truncate + Group By" "SELECT TRUNC(DATE,'DAY') DAY FROM $table GROUP BY TRUNC(DATE,'DAY');"
+queryex "5 - Filter + Count" "SELECT COUNT(1) FROM $table WHERE CORE<10;"
+
+echo ""; echo "Generating and upserting data..."
+java -jar $testjar $rowcount
+echo "";
+echo $statements>$qry
+$execute $data $qry
+
+# clear temporary files
+cleartempfiles
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/psql.py
----------------------------------------------------------------------
diff --git a/bin/psql.py b/bin/psql.py
deleted file mode 100755
index 5891ee2..0000000
--- a/bin/psql.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-############################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-############################################################################
-
-import os
-import subprocess
-import fnmatch
-import sys
-
-
-def find(pattern, path):
- for root, dirs, files in os.walk(path):
- for name in files:
- if fnmatch.fnmatch(name, pattern):
- return os.path.join(root, name)
- return ""
-
-current_dir = os.path.dirname(os.path.abspath(__file__))
-phoenix_jar_path = os.path.join(current_dir, "..", "phoenix-assembly",
- "target")
-phoenix_client_jar = find("phoenix-*-client.jar", phoenix_jar_path)
-
-# HBase configuration folder path (where hbase-site.xml reside) for
-# HBase/Phoenix client side property override
-java_cmd = """java -cp ".:""" + current_dir + ":" + phoenix_client_jar + \
- """" -Dlog4j.configuration=file:""" + \
- os.path.join(current_dir, "log4j.properties") + \
- " org.apache.phoenix.util.PhoenixRuntime " + ' '.join(sys.argv[1:])
-
-subprocess.call(java_cmd, shell=True)
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/psql.sh
----------------------------------------------------------------------
diff --git a/bin/psql.sh b/bin/psql.sh
new file mode 100755
index 0000000..212db4c
--- /dev/null
+++ b/bin/psql.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+# Phoenix client jar. To generate new jars: $ mvn package -DskipTests
+current_dir=$(cd $(dirname $0);pwd)
+phoenix_jar_path="$current_dir/../phoenix-assembly/target"
+phoenix_client_jar=$(find $phoenix_jar_path/phoenix-*-client.jar)
+
+# HBase configuration folder path (where hbase-site.xml reside) for HBase/Phoenix client side property override
+hbase_config_path="$current_dir"
+
+java -cp "$hbase_config_path:$phoenix_client_jar" -Dlog4j.configuration=file:$current_dir/log4j.properties org.apache.phoenix.util.PhoenixRuntime "$@"
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/sqlline.py
----------------------------------------------------------------------
diff --git a/bin/sqlline.py b/bin/sqlline.py
deleted file mode 100755
index 287821d..0000000
--- a/bin/sqlline.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-############################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-############################################################################
-
-import os
-import subprocess
-import fnmatch
-import sys
-
-
-def find(pattern, path):
- for root, dirs, files in os.walk(path):
- for name in files:
- if fnmatch.fnmatch(name, pattern):
- return os.path.join(root, name)
- return ""
-
-current_dir = os.path.dirname(os.path.abspath(__file__))
-phoenix_jar_path = os.path.join(current_dir, "..", "phoenix-assembly",
- "target")
-phoenix_client_jar = find("phoenix-*-client.jar", phoenix_jar_path)
-
-if len(sys.argv) < 2:
- print "Zookeeper not specified. \nUsage: sqlline.sh <zookeeper> \
-<optional_sql_file> \nExample: \n 1. sqlline.sh localhost \n 2. sqlline.sh \
-localhost ../examples/stock_symbol.sql"
- sys.exit()
-
-sqlfile = ""
-
-if len(sys.argv) > 2:
- sqlfile = "--run=" + sys.argv[2]
-
-java_cmd = """java -cp ".:""" + phoenix_client_jar + \
- """" -Dlog4j.configuration=file:""" + \
- os.path.join(current_dir, "log4j.properties") + \
- " sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver \
--u jdbc:phoenix:" + sys.argv[1] + \
- " -n none -p none --color=true --fastConnect=false --verbose=true \
---isolation=TRANSACTION_READ_COMMITTED " + sqlfile
-
-subprocess.call(java_cmd, shell=True)
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/sqlline.sh
----------------------------------------------------------------------
diff --git a/bin/sqlline.sh b/bin/sqlline.sh
new file mode 100755
index 0000000..ed5462a
--- /dev/null
+++ b/bin/sqlline.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+############################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+# Phoenix client jar. To generate new jars: $ mvn package -DskipTests
+current_dir=$(cd $(dirname $0);pwd)
+phoenix_jar_path="$current_dir/../phoenix-assembly/target"
+phoenix_client_jar=$(find $phoenix_jar_path/phoenix-*-client.jar)
+
+
+if [ -z "$1" ]
+ then echo -e "Zookeeper not specified. \nUsage: sqlline.sh <zookeeper> <optional_sql_file> \nExample: \n 1. sqlline.sh localhost \n 2. sqlline.sh localhost ../examples/stock_symbol.sql";
+ exit;
+fi
+
+if [ "$2" ]
+ then sqlfile="--run=$2";
+fi
+
+java -cp ".:$phoenix_client_jar" -Dlog4j.configuration=file:$current_dir/log4j.properties sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver -u jdbc:phoenix:$1 -n none -p none --color=true --fastConnect=false --verbose=true --isolation=TRANSACTION_READ_COMMITTED $sqlfile
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/fcc987f9/bin/upgradeTo2.sh
----------------------------------------------------------------------
diff --git a/bin/upgradeTo2.sh b/bin/upgradeTo2.sh
new file mode 100755
index 0000000..44b2f4e
--- /dev/null
+++ b/bin/upgradeTo2.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+############################################################################
+
+# Phoenix client jar. To generate new jars: $ mvn package -DskipTests
+current_dir=$(cd $(dirname $0);pwd)
+phoenix_jar_path="$current_dir/../phoenix-assembly/target"
+phoenix_client_jar=$(find $phoenix_jar_path/phoenix-*-client.jar)
+
+# HBase configuration folder path (where hbase-site.xml reside) for HBase/Phoenix client side property override
+hbase_config_path="$current_dir"
+
+java -cp "$hbase_config_path:$phoenix_client_jar" -Dlog4j.configuration=file:$current_dir/log4j.properties org.apache.phoenix.util.PhoenixRuntime -u "$@"