PHOENIX-5873 Fix loadbalancer packaging problem for queryserver scripts
diff --git a/assembly/src/assembly/cluster.xml b/assembly/src/assembly/cluster.xml
index 59f7bee..4d6bc1b 100644
--- a/assembly/src/assembly/cluster.xml
+++ b/assembly/src/assembly/cluster.xml
@@ -49,6 +49,13 @@
<directory>${project.build.directory}/maven-repo</directory>
<outputDirectory>${project.parent.artifactId}-${project.parent.version}/maven</outputDirectory>
</fileSet>
+ <fileSet>
+ <directory>${project.basedir}/../load-balancer/target</directory>
+ <outputDirectory>${project.parent.artifactId}-${project.parent.version}/load-balancer/target</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
</fileSets>
<dependencySets>
<dependencySet>
@@ -56,6 +63,7 @@
<outputDirectory>${project.parent.artifactId}-${project.parent.version}/lib</outputDirectory>
<includes>
<include>sqlline:sqlline:jar:jar-with-dependencies</include>
+ <include>com.google.guava:guava</include>
</includes>
</dependencySet>
<dependencySet>
diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py
index 677761f..6ceb976 100755
--- a/bin/phoenix_utils.py
+++ b/bin/phoenix_utils.py
@@ -71,7 +71,7 @@
PHOENIX_CLIENT_JAR_PATTERN = "phoenix-*[!n]-client.jar"
PHOENIX_THIN_CLIENT_JAR_PATTERN = "phoenix-*-thin-client.jar"
PHOENIX_QUERYSERVER_JAR_PATTERN = "phoenix-*-queryserver.jar"
- PHOENIX_LOADBALANCER_JAR_PATTERN = "phoenix-load-balancer-*[!t][!e][!s][!t][!s].jar"
+ PHOENIX_LOADBALANCER_JAR_PATTERN = "load-balancer-*[!t][!e][!s][!t][!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-*-minimal*.jar"
@@ -102,6 +102,9 @@
global current_dir
current_dir = os.path.dirname(os.path.abspath(__file__))
+ global phoenix_queryserver_classpath
+ phoenix_queryserver_classpath = os.path.join(current_dir, "../lib/*")
+
global pherf_conf_path
pherf_conf_path = os.path.join(current_dir, "config")
pherf_properties_file = find("pherf.properties", pherf_conf_path)
@@ -165,7 +168,7 @@
phoenix_queryserver_jar = findFileInPathWithoutRecursion(PHOENIX_QUERYSERVER_JAR_PATTERN, os.path.join(current_dir, ".."))
global phoenix_loadbalancer_jar
- phoenix_loadbalancer_jar = find(PHOENIX_LOADBALANCER_JAR_PATTERN, os.path.join(current_dir, "..", "phoenix-loadbalancer", "target", "*"))
+ phoenix_loadbalancer_jar = find(PHOENIX_LOADBALANCER_JAR_PATTERN, os.path.join(current_dir, "..", "load-balancer", "target", "*"))
if phoenix_loadbalancer_jar == "":
phoenix_loadbalancer_jar = findFileInPathWithoutRecursion(PHOENIX_LOADBALANCER_JAR_PATTERN, os.path.join(current_dir, "..", "lib"))
if phoenix_loadbalancer_jar == "":
@@ -231,6 +234,7 @@
print "testjar:", testjar
print "phoenix_queryserver_jar:", phoenix_queryserver_jar
print "phoenix_loadbalancer_jar:", phoenix_loadbalancer_jar
+ print "phoenix_queryserver_classpath", phoenix_queryserver_classpath
print "phoenix_thin_client_jar:", phoenix_thin_client_jar
print "hadoop_classpath:", hadoop_classpath
print "sqlline_with_deps_jar", sqlline_with_deps_jar
diff --git a/bin/queryserver.py b/bin/queryserver.py
index 5ca99a4..0e725b0 100755
--- a/bin/queryserver.py
+++ b/bin/queryserver.py
@@ -120,8 +120,11 @@
# The command is run through subprocess so environment variables are automatically inherited
java_cmd = '%(java)s -cp ' + hbase_config_path + os.pathsep + hadoop_config_path + os.pathsep + \
- phoenix_utils.phoenix_client_jar + os.pathsep + phoenix_utils.phoenix_loadbalancer_jar + \
- os.pathsep + phoenix_utils.phoenix_queryserver_jar + os.pathsep + hadoop_classpath + \
+ phoenix_utils.phoenix_client_jar + os.pathsep + \
+ phoenix_utils.phoenix_loadbalancer_jar + os.pathsep + \
+ phoenix_utils.phoenix_queryserver_jar + os.pathsep + \
+ phoenix_utils.phoenix_queryserver_classpath + os.pathsep + \
+ hadoop_classpath + \
" -Dproc_phoenixserver" + \
" -Dlog4j.configuration=file:" + os.path.join(phoenix_utils.current_dir, "log4j.properties") + \
" -Dpsql.root.logger=%(root_logger)s" + \
diff --git a/pom.xml b/pom.xml
index 56d7d48..94258a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -419,6 +419,16 @@
<version>${jetty.version}</version>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-http</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
@@ -546,16 +556,6 @@
<!-- Other test dependencies -->
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-core</artifactId>
<version>${phoenix.version}</version>
diff --git a/queryserver/pom.xml b/queryserver/pom.xml
index 1d08f7d..ba0d2c3 100644
--- a/queryserver/pom.xml
+++ b/queryserver/pom.xml
@@ -198,6 +198,14 @@
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
@@ -209,10 +217,6 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </dependency>
<!-- for tests -->
<dependency>
@@ -226,10 +230,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>