Repository: bigtop
Updated Branches:
  refs/heads/master 4ac6f736d -> db414adc3


BIGTOP-2163. Add a phoenix-pherf sub-package for Phoenix


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/db414adc
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/db414adc
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/db414adc

Branch: refs/heads/master
Commit: db414adc33fc7103b659d975b651ee46dcc57909
Parents: 4ac6f73
Author: Youngwoo Kim <yw...@apache.org>
Authored: Thu Dec 3 14:59:58 2015 +0900
Committer: Youngwoo Kim <yw...@apache.org>
Committed: Mon Dec 7 10:25:40 2015 +0900

----------------------------------------------------------------------
 .../src/common/phoenix/install_phoenix.sh       | 49 +++++++++++++++++++-
 bigtop-packages/src/deb/phoenix/control         |  6 +++
 .../src/deb/phoenix/phoenix-pherf.install       |  1 +
 .../src/rpm/phoenix/SPECS/phoenix.spec          | 12 +++++
 4 files changed, 67 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/db414adc/bigtop-packages/src/common/phoenix/install_phoenix.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/phoenix/install_phoenix.sh 
b/bigtop-packages/src/common/phoenix/install_phoenix.sh
index 0a85f74..a6ab9f7 100755
--- a/bigtop-packages/src/common/phoenix/install_phoenix.sh
+++ b/bigtop-packages/src/common/phoenix/install_phoenix.sh
@@ -100,6 +100,7 @@ MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
 DOC_DIR=${DOC_DIR:-/usr/share/doc/phoenix}
 LIB_DIR=${LIB_DIR:-/usr/lib/phoenix}
 BIN_DIR=${BIN_DIR:-/usr/lib/phoenix/bin}
+PHERF_DIR=${PHERF_DIR:-/usr/lib/phoenix/pherf}
 ETC_DIR=${ETC_DIR:-/etc/phoenix}
 CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
 
@@ -110,7 +111,7 @@ install -d -m 0755 $PREFIX/$DOC_DIR
 install -d -m 0755 $PREFIX/$MAN_DIR
 install -d -m 0755 $PREFIX/$ETC_DIR
 install -d -m 0755 $PREFIX/$CONF_DIR
-
+install -d -m 0755 $PREFIX/$PHERF_DIR
 install -d -m 0755 $PREFIX/var/lib/phoenix
 install -d -m 0755 $PREFIX/var/log/phoenix
 
@@ -135,3 +136,49 @@ ln -s `cd $PREFIX/$LIB_DIR ; ls phoenix*-thin-client.jar` 
$PREFIX/$LIB_DIR/phoen
 
 # phoenix-server for placing on the HBase regionserver classpath
 ln -s `cd $PREFIX/$LIB_DIR ; ls phoenix*-server.jar` 
$PREFIX/$LIB_DIR/phoenix-server.jar
+
+# Pherf
+unzip $BUILD_DIR/phoenix-pherf/phoenix-pherf-*-cluster.zip -d 
$BUILD_DIR/phoenix-pherf/
+mv $BUILD_DIR/phoenix-pherf/phoenix-pherf-*-cluster/* $PREFIX/$PHERF_DIR/
+rm -rf $PREFIX/$PHERF_DIR/config/env.sh
+
+cat >>$PREFIX/$PHERF_DIR/config/env.sh <<EOF
+#!/bin/sh
+
+#  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.
+
+# Required variable to point to Java installation
+#JAVA_HOME=
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+# Absolute path the the unzipped directory of the HBase installation
+# This is required if you build using the default or cluster profile
+# Cluster profile assumes you want to pick up dependencies from HBase classpath
+# Not required in standalone.
+HBASE_PATH=/usr/lib/hbase
+
+# Add a space seperated list of -D environment args. "-Dkey1-val1 -Dkey2=val2"
+ENV_PROPS=""
+
+# Uncomment if you would like to remotely debug
+#REMOTE_DEBUG="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=6666"
+EOF
+

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db414adc/bigtop-packages/src/deb/phoenix/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/control 
b/bigtop-packages/src/deb/phoenix/control
index 7b44d5c..5b0ed7f 100644
--- a/bigtop-packages/src/deb/phoenix/control
+++ b/bigtop-packages/src/deb/phoenix/control
@@ -39,3 +39,9 @@ Depends: phoenix (= ${source:Version})
 Description: The Phoenix Query Server provides an alternative means for 
  interaction with Phoenix and HBase. Soon this will enable access from 
  environments other than the JVM.
+
+Package: phoenix-pherf
+Architecture: all
+Depends: phoenix (= ${source:Version})
+Description: Pherf is a standalone tool that can perform performance and 
functional testing
+ through Phoenix

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db414adc/bigtop-packages/src/deb/phoenix/phoenix-pherf.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/phoenix-pherf.install 
b/bigtop-packages/src/deb/phoenix/phoenix-pherf.install
new file mode 100644
index 0000000..1d98a76
--- /dev/null
+++ b/bigtop-packages/src/deb/phoenix/phoenix-pherf.install
@@ -0,0 +1 @@
+/usr/lib/phoenix/pherf

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db414adc/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec 
b/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
index 84fd0bf..c6c1273 100644
--- a/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
+++ b/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
@@ -117,6 +117,15 @@ The Phoenix Query Server provides an alternative means for 
interaction
 with Phoenix and HBase. Soon this will enable access from environments 
 other than the JVM.
 
+%package pherf
+Summary: Phoenix and HBase SQL Performance Test Framework
+Group: Development/Libraries
+Requires: phoenix = %{version}-%{release}
+
+%description pherf
+Pherf is a standalone tool that can perform performance and functional testing 
+through Phoenix
+
 %prep
 %setup -n %{name}-%{phoenix_base_version}-src
 
@@ -182,6 +191,9 @@ fi
 %config(noreplace) %{etc_phoenix_conf_dist}
 %config(noreplace) %{_sysconfdir}/default/phoenix
 
+%files pherf
+%{phoenix_home}/pherf
+
 %define service_macro() \
 %files %1 \
 %attr(0755,root,root)/%{initd_dir}/%{name}-%1 \

Reply via email to