bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yw...@apache.org
Subject bigtop git commit: BIGTOP-1941. Upgrade Phoenix to 4.4.0
Date Mon, 03 Aug 2015 00:07:07 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master b5ad721be -> db0c8e3c8


BIGTOP-1941. Upgrade Phoenix to 4.4.0


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

Branch: refs/heads/master
Commit: db0c8e3c85df18988f594c8f65308a28c059ebe0
Parents: b5ad721
Author: YoungWoo Kim <ywkim@apache.org>
Authored: Tue Jul 28 15:11:25 2015 +0900
Committer: YoungWoo Kim <ywkim@apache.org>
Committed: Mon Aug 3 09:02:52 2015 +0900

----------------------------------------------------------------------
 .../src/common/phoenix/do-component-build       |  5 +-
 .../src/common/phoenix/install_phoenix.sh       | 17 +++--
 .../common/phoenix/phoenix-queryserver.default  | 16 ++++
 .../src/common/phoenix/phoenix-queryserver.svc  | 79 ++++++++++++++++++++
 bigtop-packages/src/deb/phoenix/compat          |  2 +-
 bigtop-packages/src/deb/phoenix/control         | 11 ++-
 bigtop-packages/src/deb/phoenix/phoenix.preinst | 52 +++++++++++++
 bigtop-packages/src/deb/phoenix/rules           |  7 +-
 .../src/rpm/phoenix/SPECS/phoenix.spec          | 50 ++++++++++++-
 .../smoke-tests/phoenix/STOCK_SYMBOL.csv        |  9 +++
 .../smoke-tests/phoenix/STOCK_SYMBOL.sql        | 24 ++++++
 .../phoenix/TestPhoenixQueryServer.groovy       | 57 ++++++++++++++
 bigtop-tests/smoke-tests/phoenix/build.gradle   | 53 +++++++++++++
 .../smoke-tests/phoenix/log4j.properties        | 24 ++++++
 .../smoke-tests/phoenix/smoke-test-teardown.sql |  1 +
 bigtop-tests/smoke-tests/phoenix/smoke-test.sql |  1 +
 bigtop.mk                                       |  7 +-
 17 files changed, 398 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/common/phoenix/do-component-build
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/phoenix/do-component-build b/bigtop-packages/src/common/phoenix/do-component-build
index 49fd2ef..81d0fb4 100644
--- a/bigtop-packages/src/common/phoenix/do-component-build
+++ b/bigtop-packages/src/common/phoenix/do-component-build
@@ -18,12 +18,15 @@ set -ex
 
 . `dirname $0`/bigtop.bom
 
+PHOENIX_HBASE_VERSION=HBase-0.98
+
 mvn -DskipTests \
     -Dhadoop-two.version=$HADOOP_VERSION  \
     -Dhbase.version=$HBASE_VERSION-hadoop2  \
     -Dpig.version=$PIG_VERSION  \
     -Dflume.version=$FLUME_VERSION  \
+    -Dspark.version=${SPARK_VERSION} \
     clean install package "$@"
 rm -rf build
 mkdir build
-tar -C build --strip-components=1 -xzf phoenix-assembly/target/phoenix-$PHOENIX_VERSION.tar.gz
+tar -C build --strip-components=1 -xzf phoenix-assembly/target/phoenix-$PHOENIX_VERSION-${PHOENIX_HBASE_VERSION}.tar.gz

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/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 b45053f..dca0066 100755
--- a/bigtop-packages/src/common/phoenix/install_phoenix.sh
+++ b/bigtop-packages/src/common/phoenix/install_phoenix.sh
@@ -111,13 +111,13 @@ install -d -m 0755 $PREFIX/$MAN_DIR
 install -d -m 0755 $PREFIX/$ETC_DIR
 install -d -m 0755 $PREFIX/$CONF_DIR
 
-cp -ra $BUILD_DIR/lib/* $PREFIX/$LIB_DIR/lib
-cp -a $BUILD_DIR/phoenix*.jar $PREFIX/$LIB_DIR
-cp -a $BUILD_DIR/examples $PREFIX/$DOC_DIR
-cp -a  $BUILD_DIR/bin/*.txt $PREFIX/$DOC_DIR
+install -d -m 0755 $PREFIX/var/lib/phoenix
+install -d -m 0755 $PREFIX/var/log/phoenix
 
-cp -a $BUILD_DIR/bin/*.py $PREFIX/$BIN_DIR
-cp -a $BUILD_DIR/bin/*.properties $PREFIX/$BIN_DIR
+cp -ra $BUILD_DIR/{bin,lib} $PREFIX/$LIB_DIR/
+chmod 755 $PREFIX/$BIN_DIR/*.py
+cp -a $BUILD_DIR/*.jar $PREFIX/$LIB_DIR/
+cp -a $BUILD_DIR/examples $PREFIX/$DOC_DIR
 
 # Remove sources jar
 rm $PREFIX/$LIB_DIR/lib/phoenix-*-sources.jar
@@ -128,7 +128,10 @@ find $PREFIX/$LIB_DIR -name '*.jar' -exec chmod a-x {} \;
 # Create version independent symlinks
 
 # phoenix-client for clients like sqlline
-ln -s `cd $PREFIX/$LIB_DIR ; ls phoenix*-client.jar` $PREFIX/$LIB_DIR/phoenix-client.jar
+ln -s `cd $PREFIX/$LIB_DIR ; ls phoenix*-client.jar | grep -v thin` $PREFIX/$LIB_DIR/phoenix-client.jar
+
+# phoenix-thin-client
+ln -s `cd $PREFIX/$LIB_DIR ; ls phoenix*-thin-client.jar` $PREFIX/$LIB_DIR/phoenix-thin-client.jar
 
 # 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

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/common/phoenix/phoenix-queryserver.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/phoenix/phoenix-queryserver.default b/bigtop-packages/src/common/phoenix/phoenix-queryserver.default
new file mode 100644
index 0000000..6c7d85a
--- /dev/null
+++ b/bigtop-packages/src/common/phoenix/phoenix-queryserver.default
@@ -0,0 +1,16 @@
+# 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.
+
+export HBASE_CONF_DIR=/etc/hbase/conf/

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/common/phoenix/phoenix-queryserver.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/phoenix/phoenix-queryserver.svc b/bigtop-packages/src/common/phoenix/phoenix-queryserver.svc
new file mode 100644
index 0000000..3fb013e
--- /dev/null
+++ b/bigtop-packages/src/common/phoenix/phoenix-queryserver.svc
@@ -0,0 +1,79 @@
+# 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.
+
+DAEMON="phoenix-queryserver"
+DESC="Phoenix QueryServer"
+EXEC_PATH="/usr/lib/phoenix/bin/queryserver.py"
+SVC_USER="phoenix"
+WORKING_DIR="/usr/lib/phoenix"
+DAEMON_FLAGS=""
+CONF_DIR=""
+PIDFILE="/var/run/phoenix/${DAEMON}.pid"
+
+generate_start() {
+
+cat <<'__EOT__'
+start() {
+    [ -x $EXE_FILE ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+
+    checkstatusofproc
+    status=$?
+    if [ "$status" -eq "$STATUS_RUNNING" ]; then
+        log_success_msg "${DESC} is running"
+        exit 0
+    fi
+
+    LOG_FILE=/var/log/phoenix/${DAEMON}.out
+
+    su -s /bin/bash $SVC_USER -c "nohup nice -n 0 $EXEC_PATH start \
+      > $LOG_FILE 2>&1 < /dev/null & "'echo $! '"> $PIDFILE"
+    sleep 3
+
+    checkstatusofproc
+    RETVAL=$?
+
+    if [ $RETVAL -eq $STATUS_RUNNING ]; then
+      touch $LOCKFILE
+      log_success_msg "Started ${DESC} (${DAEMON}): "
+    else
+      log_failure_msg "Failed to start ${DESC}. Return value: $RETVAL"
+    fi
+
+    return $RETVAL
+}
+__EOT__
+
+}
+
+generate_stop() {
+
+cat <<'__EOT__'
+stop() {
+    su -s /bin/bash $SVC_USER -c "$EXEC_PATH stop"
+    RETVAL=$?
+
+    if [ $RETVAL -eq $RETVAL_SUCCESS ]; then
+      log_success_msg "Stopped ${DESC}: "
+      rm -f $LOCKFILE $PIDFILE
+    else
+      log_failure_msg "Failure to stop ${DESC}. Return value: $RETVAL"
+    fi
+
+    return $RETVAL
+}
+__EOT__
+
+}
+

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/deb/phoenix/compat
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/compat b/bigtop-packages/src/deb/phoenix/compat
index 7f8f011..ec63514 100644
--- a/bigtop-packages/src/deb/phoenix/compat
+++ b/bigtop-packages/src/deb/phoenix/compat
@@ -1 +1 @@
-7
+9

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/deb/phoenix/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/control b/bigtop-packages/src/deb/phoenix/control
index 9c3a7b4..7b44d5c 100644
--- a/bigtop-packages/src/deb/phoenix/control
+++ b/bigtop-packages/src/deb/phoenix/control
@@ -17,8 +17,8 @@ Source: phoenix
 Section: misc
 Priority: extra
 Maintainer: Bigtop <dev@bigtop.apache.org>
-Build-Depends: debhelper (>= 7.0.50~)
-Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
 Homepage: http://phoenix.apache.org
 
 Package: phoenix
@@ -32,3 +32,10 @@ Description: Phoenix is a SQL skin over HBase and client-embedded JDBC
driver.
  performance on the order of milliseconds for small queries, or seconds for
  tens of millions of rows. Applications interact with Phoenix through a
  standard JDBC interface; all the usual interfaces are supported.
+
+Package: phoenix-queryserver
+Architecture: all
+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.

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/deb/phoenix/phoenix.preinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/phoenix.preinst b/bigtop-packages/src/deb/phoenix/phoenix.preinst
new file mode 100644
index 0000000..f3174ca
--- /dev/null
+++ b/bigtop-packages/src/deb/phoenix/phoenix.preinst
@@ -0,0 +1,52 @@
+#!/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.
+
+# preinst script for hive
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    install|upgrade)
+        if ! getent passwd phenix >/dev/null; then
+                # Adding system user: phenix.
+                adduser \
+                  --system \
+                  --group \
+                  --home /var/lib/phenix \
+                  --gecos "Phoenix User" \
+                  --shell /bin/false \
+                  phoenix >/dev/null
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-packages/src/deb/phoenix/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/phoenix/rules b/bigtop-packages/src/deb/phoenix/rules
index f4e5e9a..d80e547 100755
--- a/bigtop-packages/src/deb/phoenix/rules
+++ b/bigtop-packages/src/deb/phoenix/rules
@@ -39,11 +39,16 @@ override_dh_auto_build:
 	mkdir -p debian/tmp/bigtop-empty
 	bash debian/do-component-build -Dmaven.repo.local=${HOME}/.m2/repository
 
-override_dh_auto_install:
+.PHONY: queryserver
+	bash debian/init.d.tmpl debian/${phoenix_pkg_name}-queryserver.svc deb debian/${phoenix_pkg_name}-queryserver.init
+	
+override_dh_auto_install: queryserver
 	cp debian/phoenix.default debian/${phoenix_pkg_name}/etc/default/${phoenix_pkg_name}
+	cp debian/phoenix-queryserver.default debian/${phoenix_pkg_name}/etc/default/${phoenix_pkg_name}-queryserver
 	bash -x debian/install_phoenix.sh \
 	  --build-dir=$${PWD}/build     \
 	  --prefix=debian/tmp
+
 	# Symlink in the dependency jars from their packages.
 	rm -f debian/tmp/usr/lib/${phoenix_pkg_name}/lib/zookeeper*.jar
 	ln -f -s ${zookeeper_home}/zookeeper.jar debian/tmp/usr/lib/${phoenix_pkg_name}/lib/

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/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 148b157..1212b4a 100644
--- a/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
+++ b/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
@@ -17,6 +17,8 @@
 %define etc_phoenix_conf %{_sysconfdir}/%{name}/conf
 %define etc_phoenix_conf_dist %{etc_phoenix_conf}.dist
 %define lib_phoenix %{phoenix_home}/lib
+%define var_lib_phoenix /var/lib/%{name}
+%define var_log_phoenix /var/log/%{name}
 %define man_dir %{_mandir}
 %define zookeeper_home /usr/lib/zookeeper
 %define hadoop_home /usr/lib/hadoop
@@ -24,6 +26,7 @@
 %define hadoop_yarn_home /usr/lib/hadoop-yarn
 %define hadoop_hdfs_home /usr/lib/hadoop-hdfs
 %define hbase_home /usr/lib/hbase
+%define phoenix_hbase_version HBase-0.98
 
 %if  %{?suse_version:1}0
 
@@ -44,6 +47,7 @@
 
 %define doc_phoenix %{_docdir}/%{name}
 %define alternatives_cmd update-alternatives
+%global initd_dir %{_sysconfdir}/rc.d
 
 %else
 
@@ -66,6 +70,7 @@
 
 %define doc_phoenix %{_docdir}/%{name}-%{phoenix_version}
 %define alternatives_cmd alternatives
+%global initd_dir %{_sysconfdir}/rc.d/init.d
 
 %endif
 
@@ -78,10 +83,13 @@ URL: http://phoenix.apache.org
 Group: Development/Libraries
 Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
 License: ASL 2.0
-Source0: %{name}-%{phoenix_base_version}-src.tar.gz
+Source0: %{name}-%{phoenix_base_version}-%{phoenix_hbase_version}-src.tar.gz
 Source1: do-component-build
 Source2: install_phoenix.sh
 Source3: phoenix.default
+Source4: bigtop.bom
+Source5: %{name}-queryserver.svc
+Source6: %{name}-queryserver.default
 BuildArch: noarch
 Requires: hadoop, hadoop-mapreduce, hadoop-yarn, hbase, zookeeper
 
@@ -100,9 +108,18 @@ performance on the order of milliseconds for small queries, or seconds
for
 tens of millions of rows. Applications interact with Phoenix through a
 standard JDBC interface; all the usual interfaces are supported.
 
+%package queryserver
+Summary: A stand-alone server that exposes Phoenix to thin clients
+Group: Development/Libraries
+Requires: phoenix = %{version}-%{release}
+
+%description queryserver
+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.
 
 %prep
-%setup -n %{name}-%{phoenix_base_version}-src
+%setup -n %{name}-%{phoenix_base_version}-%{phoenix_hbase_version}-src
 
 %build
 bash %{SOURCE1}
@@ -116,6 +133,7 @@ bash %{SOURCE2} \
 
 %__install -d -m 0755 $RPM_BUILD_ROOT/etc/default/
 %__install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/default/%{name}
+%__install -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/etc/default/%{name}-queryserver
 
 # Pull zookeeper, hadoop, hadoop-mapreduce, hadoop-yarn, and hbase deps from their packages
 rm -f $RPM_BUILD_ROOT/%{lib_phoenix}/zookeeper*.jar
@@ -135,6 +153,14 @@ ln -f -s %{hbase_home}/hbase-common.jar $RPM_BUILD_ROOT/%{lib_phoenix}
 ln -f -s %{hbase_home}/hbase-protocol.jar $RPM_BUILD_ROOT/%{lib_phoenix}
 ln -f -s %{hbase_home}/hbase-client.jar $RPM_BUILD_ROOT/%{lib_phoenix}
 
+# Install init script
+init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-queryserver
+bash $RPM_SOURCE_DIR/init.d.tmpl $RPM_SOURCE_DIR/%{name}-queryserver.svc rpm $init_file
+
+%pre
+getent group phoenix >/dev/null || groupadd -r phoenix
+getent passwd phoenix >/dev/null || useradd -c "Phoenix" -s /sbin/nologin -g phoenix -r
-d %{var_lib_phoenix} phoenix 2> /dev/null || :
+    
 %post
 %{alternatives_cmd} --install %{etc_phoenix_conf} %{name}-conf %{etc_phoenix_conf_dist} 30
 
@@ -156,3 +182,23 @@ fi
 %{bin_phoenix}
 %config(noreplace) %{etc_phoenix_conf_dist}
 %config(noreplace) %{_sysconfdir}/default/phoenix
+
+%define service_macro() \
+%files %1 \
+%attr(0755,root,root)/%{initd_dir}/%{name}-%1 \
+%attr(0775,phoenix,phoenix) %{var_lib_phoenix} \
+%attr(0775,phoenix,phoenix) %{var_log_phoenix} \
+%config(noreplace) /etc/default/%{name}-%1 \
+%post %1 \
+chkconfig --add %{name}-%1 \
+\
+%preun %1 \
+if [ "$1" = 0 ] ; then \
+        service %{name}-%1 stop > /dev/null \
+        chkconfig --del %{name}-%1 \
+fi \
+%postun %1 \
+if [ $1 -ge 1 ]; then \
+   service %{name}-%1 condrestart >/dev/null 2>&1 || : \
+fi
+%service_macro queryserver

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.csv
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.csv b/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.csv
new file mode 100644
index 0000000..66c1032
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.csv
@@ -0,0 +1,9 @@
+AAPL,APPLE Inc.
+CRM,SALESFORCE
+GOOG,Google
+HOG,Harlet-Davidson Inc.
+HPQ,Hewlett Packard
+INTC,Intel
+MSFT,Microsoft
+WAG,Walgreens
+WMT,Walmart

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.sql
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.sql b/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.sql
new file mode 100644
index 0000000..f098da7
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/STOCK_SYMBOL.sql
@@ -0,0 +1,24 @@
+
+/*
+ * 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.
+ */
+
+-- creates stock table with single row
+CREATE TABLE IF NOT EXISTS STOCK_SYMBOL (SYMBOL VARCHAR NOT NULL PRIMARY KEY, COMPANY VARCHAR);
+UPSERT INTO STOCK_SYMBOL VALUES ('CRM','SalesForce.com');
+SELECT * FROM STOCK_SYMBOL;
+

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/TestPhoenixQueryServer.groovy
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/TestPhoenixQueryServer.groovy b/bigtop-tests/smoke-tests/phoenix/TestPhoenixQueryServer.groovy
new file mode 100644
index 0000000..cc4ace5
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/TestPhoenixQueryServer.groovy
@@ -0,0 +1,57 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ */
+
+package org.apache.bigtop.itest.phoenix
+
+import org.junit.BeforeClass
+import org.junit.AfterClass
+import static org.junit.Assert.assertNotNull
+import org.apache.bigtop.itest.shell.Shell
+import static org.junit.Assert.assertTrue
+import org.junit.Test
+import org.apache.bigtop.itest.JarContent
+import org.apache.bigtop.itest.TestUtils
+import org.apache.commons.logging.LogFactory
+import org.apache.commons.logging.Log
+
+class TestPhoenixQuerySerer {
+  static private Log LOG = LogFactory.getLog(Object.class)
+
+  static Shell sh = new Shell("/bin/bash -s")
+  static final String PHOENIX_HOME = System.getenv("PHOENIX_HOME")
+  static final String PSQL = PHOENIX_HOME + "/bin/psql.py"
+  static final String SQLLINE_THIN=PHOENIX_HOME + "/bin/sqlline-thin.py" 
+  
+  @AfterClass
+  public static void tearDown() {
+    sh.exec("rm -rf /tmp/bigtop-phoenix-smoke*");
+    sh.exec(SQLLINE_THIN + " http://localhost smoke-test-teardown.sql")
+  }
+
+  @BeforeClass
+  static void setUp() {
+    sh.exec(PSQL + " localhost STOCK_SYMBOL.sql STOCK_SYMBOL.csv")
+  }
+
+  @Test
+  void test() {
+    sh.exec(SQLLINE_THIN + " http://localhost smoke-test.sql >> /tmp/bigtop-phoenix-smoke-1")
+    sh.exec("cat /tmp/bigtop-phoenix-smoke-1")
+    assertTrue("Test failed. " + sh.getOut() + " " + sh.getErr(), sh.getOut().toString().contains("SALESFORCE")
)
+  }
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/build.gradle
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/build.gradle b/bigtop-tests/smoke-tests/phoenix/build.gradle
new file mode 100644
index 0000000..0338db5
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/build.gradle
@@ -0,0 +1,53 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ */
+
+apply plugin: 'groovy'
+
+repositories {
+  mavenCentral()
+}
+
+dependencies {
+  //needed to avoid groovy not on classpath error.
+  testCompile module('org.codehaus.groovy:groovy:1.8.0')
+  testCompile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion,
transitive: 'true'
+  testCompile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion, transitive:
'true'
+  testCompile group: 'org.apache.bigtop.itest', name: 'itest-common', version: itestVersion,
transitive: 'true'
+}
+
+
+def tests_to_include() {
+  return ["TestPhoenixQueryServer.groovy"];
+}
+
+sourceSets {
+  test {
+    resources {
+      srcDirs = ['conf/']
+    }
+
+    groovy {
+      srcDirs = ["./"]
+      exclude { FileTreeElement elem -> (doExclude(elem.getName())) }
+    }
+  }
+}
+
+test.doFirst {
+  checkEnv(["PHOENIX_HOME"])
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/log4j.properties
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/log4j.properties b/bigtop-tests/smoke-tests/phoenix/log4j.properties
new file mode 100644
index 0000000..db5aacf
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/log4j.properties
@@ -0,0 +1,24 @@
+# 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.
+
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=TRACE, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [BIGTOP-TEST-LOG %t] %-5p %c %x --- %m%n

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/smoke-test-teardown.sql
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/smoke-test-teardown.sql b/bigtop-tests/smoke-tests/phoenix/smoke-test-teardown.sql
new file mode 100644
index 0000000..11bae0f
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/smoke-test-teardown.sql
@@ -0,0 +1 @@
+DROP TABLE STOCK_SYMBOL

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop-tests/smoke-tests/phoenix/smoke-test.sql
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/phoenix/smoke-test.sql b/bigtop-tests/smoke-tests/phoenix/smoke-test.sql
new file mode 100644
index 0000000..6e0e61d
--- /dev/null
+++ b/bigtop-tests/smoke-tests/phoenix/smoke-test.sql
@@ -0,0 +1 @@
+SELECT * FROM STOCK_SYMBOL

http://git-wip-us.apache.org/repos/asf/bigtop/blob/db0c8e3c/bigtop.mk
----------------------------------------------------------------------
diff --git a/bigtop.mk b/bigtop.mk
index ff19b7d..5c31fb9 100644
--- a/bigtop.mk
+++ b/bigtop.mk
@@ -276,12 +276,13 @@ $(eval $(call PACKAGE,spark,SPARK))
 PHOENIX_NAME=phoenix
 PHOENIX_RELNOTES_NAME=Phoenix: A SQL skin over HBase
 PHOENIX_PKG_NAME=phoenix
-PHOENIX_BASE_VERSION=4.3.1
+PHOENIX_BASE_VERSION=4.4.0
 PHOENIX_PKG_VERSION=$(PHOENIX_BASE_VERSION)
 PHOENIX_RELEASE_VERSION=1
-PHOENIX_TARBALL_DST=phoenix-$(PHOENIX_BASE_VERSION)-src.tar.gz
+PHOENIX_HBASE_VERSION=HBase-0.98
+PHOENIX_TARBALL_DST=phoenix-$(PHOENIX_BASE_VERSION)-$(PHOENIX_HBASE_VERSION)-src.tar.gz
 PHOENIX_TARBALL_SRC=$(PHOENIX_TARBALL_DST)
-PHOENIX_DOWNLOAD_PATH=/phoenix/phoenix-$(PHOENIX_BASE_VERSION)/src/
+PHOENIX_DOWNLOAD_PATH=/phoenix/phoenix-$(PHOENIX_BASE_VERSION)-$(PHOENIX_HBASE_VERSION)/src/
 PHOENIX_SITE=$(APACHE_MIRROR)$(PHOENIX_DOWNLOAD_PATH)
 PHOENIX_ARCHIVE=$(APACHE_ARCHIVE)$(PHOENIX_DOWNLOAD_PATH)
 $(eval $(call PACKAGE,phoenix,PHOENIX))


Mime
View raw message