diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py
index 126139dc00e..d5cfab6574c 100755
--- a/bin/phoenix_utils.py
+++ b/bin/phoenix_utils.py
@@ -77,10 +77,16 @@ def findClasspath(command_name):
return tryDecode(subprocess.Popen(command, shell=True, stdout=subprocess.PIPE).stdout.read())
def setPath():
- PHOENIX_CLIENT_JAR_PATTERN = "phoenix-client-hbase-*[!s].jar"
+ PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN = "phoenix-client-embedded-hbase-*[!s].jar"
PHOENIX_TRACESERVER_JAR_PATTERN = "phoenix-tracing-webapp-*-runnable.jar"
PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar"
PHOENIX_PHERF_JAR_PATTERN = "phoenix-pherf-*[!s].jar"
+ SLF4J_LOG4J12_JAR_PATTERN = "slf4j-log4j12-*[!s].jar"
+ SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar"
+
+
+ OVERRIDE_SLF4J_BACKEND = "OVERRIDE_SLF4J_BACKEND_JAR_LOCATION"
+ OVERRIDE_SQLLINE = "OVERRIDE_SQLLINE_JAR_LOCATION"
# Backward support old env variable PHOENIX_LIB_DIR replaced by PHOENIX_CLASS_PATH
global phoenix_class_path
@@ -113,15 +119,15 @@ def setPath():
if pherf_properties_file == "":
pherf_conf_path = os.path.join(current_dir, "..", "phoenix-pherf", "config")
- global phoenix_jar_path
- phoenix_jar_path = os.path.join(current_dir, "..", "phoenix-client-parent" , "phoenix-client", "target","*")
+ global phoenix_embedded_jar_path
+ phoenix_embedded_jar_path = os.path.join(current_dir, "..", "phoenix-client-parent" , "phoenix-client-embedded", "target","*")
- global phoenix_client_jar
- phoenix_client_jar = find(PHOENIX_CLIENT_JAR_PATTERN, phoenix_jar_path)
- if phoenix_client_jar == "":
- phoenix_client_jar = findFileInPathWithoutRecursion(PHOENIX_CLIENT_JAR_PATTERN, os.path.join(current_dir, ".."))
- if phoenix_client_jar == "":
- phoenix_client_jar = find(PHOENIX_CLIENT_JAR_PATTERN, phoenix_class_path)
+ global phoenix_client_embedded_jar
+ phoenix_client_embedded_jar = find(PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN, phoenix_embedded_jar_path)
+ if phoenix_client_embedded_jar == "":
+ phoenix_client_embedded_jar = findFileInPathWithoutRecursion(PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN, os.path.join(current_dir, ".."))
+ if phoenix_client_embedded_jar == "":
+ phoenix_client_embedded_jar = find(PHOENIX_CLIENT_EMBEDDED_JAR_PATTERN, phoenix_class_path)
global phoenix_test_jar_path
phoenix_test_jar_path = os.path.join(current_dir, "..", "phoenix-core", "target","*")
@@ -176,6 +182,16 @@ def setPath():
if phoenix_pherf_jar == "":
phoenix_pherf_jar = findFileInPathWithoutRecursion(PHOENIX_PHERF_JAR_PATTERN, os.path.join(current_dir, ".."))
+ global sqlline_with_deps_jar
+ sqlline_with_deps_jar = os.environ.get(OVERRIDE_SQLLINE)
+ if sqlline_with_deps_jar is None or sqlline_with_deps_jar == "":
+ sqlline_with_deps_jar = findFileInPathWithoutRecursion(SQLLINE_WITH_DEPS_PATTERN, os.path.join(current_dir, "..","lib"))
+
+ global slf4j_backend_jar
+ slf4j_backend_jar = os.environ.get(OVERRIDE_SLF4J_BACKEND)
+ if slf4j_backend_jar is None or slf4j_backend_jar == "":
+ slf4j_backend_jar = findFileInPathWithoutRecursion(SLF4J_LOG4J12_JAR_PATTERN, os.path.join(current_dir, "..","lib"))
+
return ""
def shell_quote(args):
@@ -204,15 +220,14 @@ def common_sqlline_args(parser):
print("hbase_conf_dir:", hbase_conf_dir)
print("hbase_conf_path:", hbase_conf_path)
print("current_dir:", current_dir)
- print("phoenix_jar_path:", phoenix_jar_path)
- print("phoenix_client_jar:", phoenix_client_jar)
+ print("phoenix_embedded_jar_path:", phoenix_embedded_jar_path)
+ print("phoenix_client_embedded_jar:", phoenix_client_embedded_jar)
print("phoenix_test_jar_path:", phoenix_test_jar_path)
print("hadoop_common_jar_path:", hadoop_common_jar_path)
print("hadoop_common_jar:", hadoop_common_jar)
print("hadoop_hdfs_jar_path:", hadoop_hdfs_jar_path)
print("hadoop_hdfs_jar:", hadoop_hdfs_jar)
print("testjar:", testjar)
- print("phoenix_queryserver_jar:", phoenix_queryserver_jar)
- print("phoenix_loadbalancer_jar:", phoenix_loadbalancer_jar)
- print("phoenix_thin_client_jar:", phoenix_thin_client_jar)
print("hadoop_classpath:", hadoop_classpath)
+ print("sqlline_with_deps_jar:", sqlline_with_deps_jar)
+ print("slf4j_backend_jar:", slf4j_backend_jar)
diff --git a/bin/sqlline.py b/bin/sqlline.py
index 23e54c5d3f6..be0637d5e3a 100755
--- a/bin/sqlline.py
+++ b/bin/sqlline.py
@@ -108,7 +108,9 @@ def kill_child():
colorSetting = "false"
java_cmd = java + ' $PHOENIX_OPTS ' + \
- ' -cp "' + hbase_config_path + os.pathsep + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_jar + \
+ ' -cp "' + phoenix_utils.sqlline_with_deps_jar + os.pathsep + hbase_config_path + os.pathsep + \
+ phoenix_utils.slf4j_backend_jar + os.pathsep + \
+ phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_utils.phoenix_client_embedded_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") + \
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index e295cbb3955..b7e07d2ae91 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -132,6 +132,10 @@
org.apache.phoenix
phoenix-client-${hbase.suffix}
+
+ org.apache.phoenix
+ phoenix-client-embedded-${hbase.suffix}
+
org.apache.phoenix
phoenix-pherf
@@ -145,5 +149,11 @@
omid-hbase-tools-hbase1.x
${omid.version}
+
+ sqlline
+ sqlline
+ ${sqlline.version}
+ jar-with-dependencies
+
diff --git a/phoenix-assembly/src/build/components/all-common-dependencies.xml b/phoenix-assembly/src/build/components/all-common-dependencies.xml
new file mode 100644
index 00000000000..5381c88529b
--- /dev/null
+++ b/phoenix-assembly/src/build/components/all-common-dependencies.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ false
+ /lib
+
+ sqlline:sqlline:jar:jar-with-dependencies
+
+
+
+
\ No newline at end of file
diff --git a/phoenix-assembly/src/build/components/all-common-jars.xml b/phoenix-assembly/src/build/components/all-common-jars.xml
index a7b3a340420..d75915ae1d0 100644
--- a/phoenix-assembly/src/build/components/all-common-jars.xml
+++ b/phoenix-assembly/src/build/components/all-common-jars.xml
@@ -30,6 +30,13 @@
phoenix-client-${hbase.suffix}-${project.version}.jar
+
+ ${project.basedir}/../phoenix-client-parent/phoenix-client-embedded/target
+ /
+
+ phoenix-client-embedded-${hbase.suffix}-${project.version}.jar
+
+
${project.basedir}/../phoenix-server/target
/
diff --git a/phoenix-assembly/src/build/package-to-tar-all.xml b/phoenix-assembly/src/build/package-to-tar-all.xml
index fa945f8ec42..f64ace90cbf 100644
--- a/phoenix-assembly/src/build/package-to-tar-all.xml
+++ b/phoenix-assembly/src/build/package-to-tar-all.xml
@@ -30,8 +30,20 @@
true
+
+
+
+ false
+ /lib
+
+ org.slf4j:slf4j-log4j12
+
+
+
+
src/build/components/all-common-jars.xml
src/build/components/all-common-files.xml
+ src/build/components/all-common-dependencies.xml
\ No newline at end of file
diff --git a/phoenix-client-parent/phoenix-client-embedded/pom.xml b/phoenix-client-parent/phoenix-client-embedded/pom.xml
index 0536dd867b7..b487027065e 100644
--- a/phoenix-client-parent/phoenix-client-embedded/pom.xml
+++ b/phoenix-client-parent/phoenix-client-embedded/pom.xml
@@ -82,10 +82,6 @@
phoenix-hbase-compat-${hbase.compat.version}
false
-
- sqlline
- sqlline
-
diff --git a/pom.xml b/pom.xml
index 408954cc80c..86a50c14639 100644
--- a/pom.xml
+++ b/pom.xml
@@ -588,7 +588,27 @@
org.apache.phoenix
- phoenix-server-hbase-1.3
+ phoenix-client-embedded-hbase-1.3
+ ${project.version}
+
+
+ org.apache.phoenix
+ phoenix-client-embedded-hbase-1.4
+ ${project.version}
+
+
+ org.apache.phoenix
+ phoenix-client-embedded-hbase-1.5
+ ${project.version}
+
+
+ org.apache.phoenix
+ phoenix-client-embedded-hbase-1.6
+ ${project.version}
+
+
+ org.apache.phoenix
+ phoenix-server-hbase-2.1
${project.version}