You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by of...@apache.org on 2015/03/14 20:31:10 UTC

bigtop git commit: BIGTOP-1660: Upgrade to Hive-1.0

Repository: bigtop
Updated Branches:
  refs/heads/master b7f4a1b57 -> 3becc79ae


BIGTOP-1660: Upgrade to Hive-1.0

Signed-off-by: Olaf Flebbe <of...@oflebbe.de>


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

Branch: refs/heads/master
Commit: 3becc79ae3b5849bcf5e9c8b58da4545fc28dfd1
Parents: b7f4a1b
Author: YoungWoo Kim <yw...@apache.org>
Authored: Sat Mar 14 07:29:40 2015 +0900
Committer: Olaf Flebbe <of...@oflebbe.de>
Committed: Sat Mar 14 20:29:34 2015 +0100

----------------------------------------------------------------------
 .../src/common/hive/do-component-build          | 18 +---
 .../src/common/hive/hive-server.default         | 20 -----
 bigtop-packages/src/common/hive/hive-server.svc | 86 --------------------
 bigtop-packages/src/common/hive/install_hive.sh |  9 +-
 bigtop-packages/src/deb/hive/compat             |  2 +-
 bigtop-packages/src/deb/hive/control            | 12 +--
 bigtop-packages/src/deb/hive/rules              |  5 +-
 bigtop-packages/src/rpm/hive/SPECS/hive.spec    | 19 +----
 bigtop.mk                                       |  2 +-
 9 files changed, 19 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/common/hive/do-component-build
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hive/do-component-build b/bigtop-packages/src/common/hive/do-component-build
index 7e9c14e..38ba6d9 100644
--- a/bigtop-packages/src/common/hive/do-component-build
+++ b/bigtop-packages/src/common/hive/do-component-build
@@ -18,20 +18,6 @@ set -ex
 
 . `dirname ${0}`/bigtop.bom
 
-
-#fix SNAPSHOT dependencies
-sed -i -e 's@-SNAPSHOT@@' pom.xml ql/pom.xml
-
-bom2props() {
-cat <<__EOT__ 
-hbase.version=$HBASE_VERSION
-zookeeper.version=$ZOOKEEPER_VERSION
-hadoop.version=$HADOOP_VERSION
-hadoop.security.version=$HADOOP_VERSION
-hadoop-0.23.version=$HADOOP_VERSION
-__EOT__
-}
-
 HIVE_MAVEN_OPTS=" -Dhbase.version=$HBASE_VERSION \
 -Dzookeeper.version=$ZOOKEEPER_VERSION \
 -Dhadoop.mr.rev=23 \
@@ -39,8 +25,10 @@ HIVE_MAVEN_OPTS=" -Dhbase.version=$HBASE_VERSION \
 -Dhadoop-23.version=$HADOOP_VERSION \
 -Dhbase.hadoop2.version=$HBASE_VERSION-hadoop2 \
 -Dmvn.hadoop.profile=hadoop23 \
--Dmaven.test.skip=true \
+-DskipTests \
 -Dhbase.version.with.hadoop.version=$HBASE_VERSION-hadoop2 \
+-Dtez.version=${TEZ_VERSION} \
+-Dspark.version=${SPARK_VERSION}
 "
 
 export MAVEN_OPTS="-Xmx1500m -Xms1500m -XX:MaxPermSize=256m"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/common/hive/hive-server.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hive/hive-server.default b/bigtop-packages/src/common/hive/hive-server.default
deleted file mode 100644
index e77f2a9..0000000
--- a/bigtop-packages/src/common/hive/hive-server.default
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-# The port for Hive server daemon to listen to.
-# Unfortunatelly, there is no way to specify the interfaces 
-# to which the daemon binds.
-#
-#PORT=

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/common/hive/hive-server.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hive/hive-server.svc b/bigtop-packages/src/common/hive/hive-server.svc
deleted file mode 100644
index 8e60b72..0000000
--- a/bigtop-packages/src/common/hive/hive-server.svc
+++ /dev/null
@@ -1,86 +0,0 @@
-# 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="hive-server"
-DESC="Hive Server"
-EXEC_PATH="/usr/lib/hive/bin/hive"
-SVC_USER="hive"
-WORKING_DIR="/var/lib/hive"
-DAEMON_FLAGS=""
-CONF_DIR="/etc/hive/conf"
-PIDFILE="/var/run/hive/${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/hive/${DAEMON}.out
-
-    exec_env="HADOOP_OPTS=\"-Dhive.log.dir=`dirname $LOG_FILE` -Dhive.log.file=${DAEMON}.log -Dhive.log.threshold=INFO\""
-
-    # Autodetect JDBC drivers for metastore
-    . /usr/lib/bigtop-utils/bigtop-detect-classpath
-    exec_env="HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${BIGTOP_CLASSPATH} $exec_env"
-
-    su -s /bin/bash $SVC_USER -c "$exec_env nohup nice -n 0 \
-        $EXEC_PATH --service hiveserver $PORT \
-            > $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() {
-    killproc -p $PIDFILE java
-    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/3becc79a/bigtop-packages/src/common/hive/install_hive.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hive/install_hive.sh b/bigtop-packages/src/common/hive/install_hive.sh
index 266cc4e..7facf15 100755
--- a/bigtop-packages/src/common/hive/install_hive.sh
+++ b/bigtop-packages/src/common/hive/install_hive.sh
@@ -113,7 +113,6 @@ BIN_DIR=${BIN_DIR:-$PREFIX/usr/bin}
 PYTHON_DIR=${PYTHON_DIR:-$HIVE_DIR/lib/py}
 HCATALOG_DIR=${HCATALOG_DIR:-$PREFIX/usr/lib/hive-hcatalog}
 HCATALOG_SHARE_DIR=${HCATALOG_DIR}/share/hcatalog
-HBASE_STORAGE_HANDLER_DIR=${HCATALOG_SHARE_DIR}/storage-handlers/hbase/lib
 INSTALLED_HCATALOG_DIR=${INSTALLED_HCATALOG_DIR:-/usr/lib/hive-hcatalog}
 CONF_DIR=/etc/hive
 CONF_DIST_DIR=/etc/hive/conf.dist
@@ -122,7 +121,7 @@ CONF_DIST_DIR=/etc/hive/conf.dist
 install -d -m 0755 ${HIVE_DIR}
 (cd ${BUILD_DIR} && tar -cf - .)|(cd ${HIVE_DIR} && tar -xf -)
 rm -f ${HIVE_DIR}/lib/hive-shims-0.2*.jar
-for jar in `ls ${HIVE_DIR}/lib/hive-*.jar`; do
+for jar in `ls ${HIVE_DIR}/lib/hive-*.jar | grep -v 'standalone.jar'`; do
     base=`basename $jar`
     (cd ${HIVE_DIR}/lib && ln -s $base ${base/-[0-9].*/.jar})
 done
@@ -246,7 +245,7 @@ install -d -m 0755 $PREFIX/var/log/hive
 
 install -d -m 0755 $PREFIX/var/lib/hive-hcatalog
 install -d -m 0755 $PREFIX/var/log/hive-hcatalog
-for DIR in ${HBASE_STORAGE_HANDLER_DIR} ${HCATALOG_SHARE_DIR} ; do
+for DIR in ${HCATALOG_SHARE_DIR} ; do
     (cd $DIR &&
      for j in hive-hcatalog-*.jar; do
        if [[ $j =~ hive-hcatalog-(.*)-${HIVE_VERSION}.jar ]]; then
@@ -255,3 +254,7 @@ for DIR in ${HBASE_STORAGE_HANDLER_DIR} ${HCATALOG_SHARE_DIR} ; do
        fi
     done)
 done
+
+# Remove Windows files
+find ${HIVE_DIR}/bin -name '*.cmd' | xargs rm -f
+find ${HCATALOG_DIR}/bin -name '*.cmd' | xargs rm -f

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

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/deb/hive/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/control b/bigtop-packages/src/deb/hive/control
index 35e6db7..8a93542 100644
--- a/bigtop-packages/src/deb/hive/control
+++ b/bigtop-packages/src/deb/hive/control
@@ -18,13 +18,13 @@ Section: misc
 Priority: extra
 Maintainer: Bigtop <de...@bigtop.apache.org>
 Build-Depends: debhelper (>= 7.0.50~)
-Standards-Version: 3.8.0
+Standards-Version: 3.9.4
 Homepage: http://hive.apache.org/
 
 
 Package: hive
 Architecture: all
-Depends: adduser, hadoop-client, bigtop-utils (>= 0.7), zookeeper, hive-jdbc (= ${source:Version})
+Depends: adduser, hadoop-client, bigtop-utils (>= 0.7), zookeeper, hive-jdbc (= ${source:Version}), python
 Description: Hive is a data warehouse infrastructure built on top of Hadoop
  Hive is a data warehouse infrastructure built on top of Hadoop that provides
  tools to enable easy data summarization, adhoc querying and analysis of large
@@ -35,12 +35,6 @@ Description: Hive is a data warehouse infrastructure built on top of Hadoop
  to be able to plug in their custom mappers and reducers to do more sophisticated 
  analysis which may not be supported by the built-in capabilities of the language.
 
-Package: hive-server
-Architecture: all
-Depends: hive (= ${source:Version})
-Description: Provides a Hive Thrift service.
- This optional package hosts a Thrift server for Hive clients across a network to use.
-
 Package: hive-server2
 Architecture: all
 Depends: hive (= ${source:Version})
@@ -67,7 +61,7 @@ Description: Provides libraries necessary to connect to Apache Hive via JDBC
 
 Package: hive-hcatalog
 Architecture: all
-Depends: hadoop, hive, bigtop-utils (>= 0.6)
+Depends: hadoop, hive, bigtop-utils (>= 0.6), python
 Description: Apache Hcatalog is a data warehouse infrastructure built on top of Hadoop
  Apache HCatalog is a table and storage management service for data created using Apache Hadoop.
  This includes:

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/deb/hive/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/rules b/bigtop-packages/src/deb/hive/rules
index f77e3c5..5ed1799 100755
--- a/bigtop-packages/src/deb/hive/rules
+++ b/bigtop-packages/src/deb/hive/rules
@@ -33,15 +33,14 @@ override_dh_auto_build:
 	bash debian/do-component-build
 	touch $@
 
-.PHONY: server
 .PHONY: server2
 .PHONY: metastore
 .PHONY: hcatalog-server
 .PHONY: webhcat-server
-server server2 metastore hcatalog-server webhcat-server:
+server2 metastore hcatalog-server webhcat-server:
 	bash debian/init.d.tmpl debian/hive-$@.svc deb debian/${hive_pkg_name}-$@.init
 
-override_dh_auto_install: server server2 metastore hcatalog-server webhcat-server
+override_dh_auto_install: server2 metastore hcatalog-server webhcat-server
 	cp debian/hive-site.xml .
 	cp debian/hive.1 .
 	cp debian/hive-hcatalog.1 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop-packages/src/rpm/hive/SPECS/hive.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hive/SPECS/hive.spec b/bigtop-packages/src/rpm/hive/SPECS/hive.spec
index 5e4541d..35647cc 100644
--- a/bigtop-packages/src/rpm/hive/SPECS/hive.spec
+++ b/bigtop-packages/src/rpm/hive/SPECS/hive.spec
@@ -25,7 +25,7 @@
 %define usr_bin /usr/bin
 %define hive_config_virtual hive_active_configuration
 %define man_dir %{_mandir}
-%define hive_services hive-server hive-metastore hive-server2 hive-hcatalog-server hive-webhcat-server
+%define hive_services hive-metastore hive-server2 hive-hcatalog-server hive-webhcat-server
 # After we run "ant package" we'll find the distribution here
 %define hive_dist build/dist
 
@@ -70,11 +70,9 @@ Source1: do-component-build
 Source2: install_hive.sh
 Source3: init.d.tmpl
 Source4: hive-site.xml
-Source5: hive-server.default
 Source6: hive-metastore.default
 Source7: hive.1
 Source8: hive-site.xml
-Source9: hive-server.svc
 Source10: hive-metastore.svc
 Source11: hive-server2.default
 Source12: hive-server2.svc
@@ -83,18 +81,13 @@ Source14: hive-hcatalog-server.svc
 Source15: hive-webhcat-server.svc
 Source16: hive-hcatalog-server.default
 Source17: hive-webhcat-server.default
+Source18: bigtop.bom
 Requires: hadoop-client, bigtop-utils >= 0.7, zookeeper, hive-jdbc = %{version}-%{release}
 Conflicts: hadoop-hive
 Obsoletes: %{name}-webinterface
 
 %description 
-Hive is a data warehouse infrastructure built on top of Hadoop that provides tools to enable easy data summarization, adhoc querying and analysis of large datasets data stored in Hadoop files. It provides a mechanism to put structure on this data and it also provides a simple query language called Hive QL which is based on SQL and which enables users familiar with SQL to query this data. At the same time, this language also allows traditional map/reduce programmers to be able to plug in their custom mappers and reducers to do more sophisticated analysis which may not be supported by the built-in capabilities of the language. 
-
-%package server
-Summary: Provides a Hive Thrift service.
-Group: System/Daemons
-Requires: %{name} = %{version}-%{release}
-Requires(pre): %{name} = %{version}-%{release}
+Hive is a data warehouse infrastructure built on top of Hadoop that provides tools to enable easy data summarization, adhoc querying and analysis of large datasets data stored in Hadoop files. It provides a mechanism to put structure on this data and it also provides a simple query language called Hive QL which is based on SQL and which enables users familiar with SQL to query this data. At the same time, this language also allows traditional map/reduce programmers to be able to plug in their custom mappers and reducers to do more sophisticated analysis which may not be supported by the built-in capabilities of the language.
 
 %if  %{?suse_version:1}0
 # Required for init scripts
@@ -118,10 +111,6 @@ Requires: insserv
 Requires: /lib/lsb/init-functions
 %endif
 
-
-%description server
-This optional package hosts a Thrift server for Hive clients across a network to use.
-
 %description server2
 This optional package hosts a Thrift server for Hive clients across a network to use with improved concurrency support.
 %package metastore
@@ -260,7 +249,6 @@ cp $RPM_SOURCE_DIR/hive-site.xml .
 %__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
 %__install -d -m 0755 $RPM_BUILD_ROOT/etc/default/
 %__install -m 0644 $RPM_SOURCE_DIR/hive-metastore.default $RPM_BUILD_ROOT/etc/default/%{name}-metastore
-%__install -m 0644 $RPM_SOURCE_DIR/hive-server.default $RPM_BUILD_ROOT/etc/default/%{name}-server
 %__install -m 0644 $RPM_SOURCE_DIR/hive-server2.default $RPM_BUILD_ROOT/etc/default/%{name}-server2
 %__install -m 0644 $RPM_SOURCE_DIR/hive-hcatalog-server.default $RPM_BUILD_ROOT/etc/default/%{name}-hcatalog-server
 %__install -m 0644 $RPM_SOURCE_DIR/hive-webhcat-server.default $RPM_BUILD_ROOT/etc/default/%{name}-webhcat-server
@@ -408,7 +396,6 @@ fi \
 if [ $1 -ge 1 ]; then \
    service %{name}-%1 condrestart >/dev/null 2>&1 || : \
 fi
-%service_macro server
 %service_macro server2
 %service_macro metastore
 %service_macro hcatalog-server

http://git-wip-us.apache.org/repos/asf/bigtop/blob/3becc79a/bigtop.mk
----------------------------------------------------------------------
diff --git a/bigtop.mk b/bigtop.mk
index 6298901..f88698d 100644
--- a/bigtop.mk
+++ b/bigtop.mk
@@ -97,7 +97,7 @@ $(eval $(call PACKAGE,pig,PIG))
 HIVE_NAME=hive
 HIVE_RELNOTES_NAME=Apache Hive
 HIVE_PKG_NAME=hive
-HIVE_BASE_VERSION=0.14.0
+HIVE_BASE_VERSION=1.0.0
 HIVE_PKG_VERSION=$(HIVE_BASE_VERSION)
 HIVE_RELEASE_VERSION=1
 HIVE_TARBALL_DST=apache-hive-$(HIVE_BASE_VERSION)-src.tar.gz