Author: bmahe
Date: Sat Jan 7 00:11:37 2012
New Revision: 1228509
URL: http://svn.apache.org/viewvc?rev=1228509&view=rev
Log:
Add flume NG 1.0.0 incubating
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/do-component-build
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/flume-ng-node.init
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/install_flume-ng.sh
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/changelog
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/compat
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/control
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/copyright
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng-node.postinst
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.docs
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.postinst
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.preinst
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.prerm
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules
(with props)
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/RPMS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/RPMS/.gitignore
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/flume-ng.spec
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SRPMS/
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SRPMS/.gitignore
Modified:
incubator/bigtop/branches/hadoop-0.23/bigtop.mk
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/do-component-build
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/do-component-build?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/do-component-build
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/do-component-build
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,19 @@
+#!/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.
+
+set -ex
+
+mvn clean install -DskipTests -Dhadoop.profile=23 "$@"
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/flume-ng-node.init
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/flume-ng-node.init?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/flume-ng-node.init
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/flume-ng-node.init
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,156 @@
+#!/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.
+#
+# Starts a Flume NG node
+#
+# chkconfig: 345 90 10
+# description: Flume NG node
+#
+### BEGIN INIT INFO
+# Provides: flume-ng-node
+# Required-Start: $remote_fs
+# Should-Start:
+# Required-Stop: $remote_fs
+# Should-Stop:
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Flume NG node
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+ERROR_PROGRAM_NOT_INSTALLED=5
+
+FLUME_LOG_DIR=/var/log/flume-ng
+FLUME_CONF_DIR=/etc/flume-ng/conf
+FLUME_RUN=/var/run/flume-ng
+FLUME_HOME=/usr/lib/flume-ng
+
+LOCKFILE="/var/lock/subsys/flume-ng-node"
+desc="Flume NG node daemon"
+
+FLUME_CONF_FILE=${FLUME_CONF_FILE:-${FLUME_CONF_DIR}/flume.conf}
+EXEC_PATH=/usr/bin/flume-ng
+FLUME_PID_FILE=${FLUME_RUN}/flume-node.pid
+
+install -d -m 0755 -o flume -g flume ${FLUME_RUN}
+USER=flume
+
+HOSTNAME=`hostname`
+FLUME_NODE_NAME=${FLUME_NODE_NAME:-$HOSTNAME}
+
+start() {
+ [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+ log_success_msg "Starting $desc (flume-ng-node): "
+ export FLUME_PID_FILE
+ /bin/su -s /bin/bash -c "${EXEC_PATH} node --conf $FLUME_CONF_DIR
--conf-file $FLUME_CONF_FILE --name $FLUME_NODE_NAME
&>>${FLUME_LOG_DIR}/flume-ng-node.log &" $USER
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch $LOCKFILE
+ return $RETVAL
+}
+
+stop() {
+ if [ ! -e $FLUME_PID_FILE ]; then
+ log_failure_msg "Flume node is not running"
+ exit $STATUS_NOT_RUNNING
+ fi
+
+ log_success_msg "Stopping $desc (flume-ng-node): "
+
+ # FLUME-919 will put an end to such extreme violence
+ FLUME_PID=`cat $FLUME_PID_FILE`
+ if [ -n $FLUME_PID ]; then
+ FLUME_PID_GROUP=$(ps -o pgrp -p ${FLUME_PID} h)
+
+ if [ -n $FLUME_PID_GROUP ]; then
+ kill -TERM -${FLUME_PID_GROUP} &>/dev/null
+ sleep 5
+ kill -KILL -${FLUME_PID_GROUP} &>/dev/null
+
+ rm -f $LOCKFILE $FLUME_PID_FILE
+ fi
+ fi
+ return 0
+}
+
+restart() {
+ stop
+ start
+}
+
+checkstatus(){
+ pidofproc -p $FLUME_PID_FILE java > /dev/null
+ status=$?
+
+ case "$status" in
+ $STATUS_RUNNING)
+ log_success_msg "Flume NG node is running"
+ ;;
+ $STATUS_DEAD)
+ log_failure_msg "Flume NG node is dead and pid file exists"
+ ;;
+ $STATUS_DEAD_AND_LOCK)
+ log_failure_msg "Flume NG node is dead and lock file exists"
+ ;;
+ $STATUS_NOT_RUNNING)
+ log_failure_msg "Flume NG node is not running"
+ ;;
+ *)
+ log_failure_msg "Flume NG node status is unknown"
+ ;;
+ esac
+ return $status
+}
+
+condrestart(){
+ [ -e /var/lock/subsys/flume-ng-node ] && restart || :
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ checkstatus
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart|try-restart)
+ condrestart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart}"
+ exit 1
+esac
+
+exit $RETVAL
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/install_flume-ng.sh
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/install_flume-ng.sh?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/install_flume-ng.sh
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/flume-ng/install_flume-ng.sh
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,146 @@
+#!/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.
+
+set -ex
+
+usage() {
+ echo "
+usage: $0 <options>
+ Required not-so-options:
+ --build-dir=DIR path to flumedist.dir
+ --prefix=PREFIX path to install into
+
+ Optional options:
+ --doc-dir=DIR path to install docs into
[/usr/share/doc/flume]
+ --flume-dir=DIR path to install flume home [/usr/lib/flume]
+ --installed-lib-dir=DIR path where lib-dir will end up on target
system
+ --bin-dir=DIR path to install bins [/usr/bin]
+ --examples-dir=DIR path to install examples [doc-dir/examples]
+ ... [ see source for more similar options ]
+ "
+ exit 1
+}
+
+OPTS=$(getopt \
+ -n $0 \
+ -o '' \
+ -l 'prefix:' \
+ -l 'doc-dir:' \
+ -l 'flume-dir:' \
+ -l 'installed-lib-dir:' \
+ -l 'bin-dir:' \
+ -l 'examples-dir:' \
+ -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+ usage
+fi
+
+eval set -- "$OPTS"
+
+while true ; do
+ case "$1" in
+ --prefix)
+ PREFIX=$2 ; shift 2
+ ;;
+ --build-dir)
+ BUILD_DIR=$2 ; shift 2
+ ;;
+ --doc-dir)
+ DOC_DIR=$2 ; shift 2
+ ;;
+ --flume-dir)
+ FLUME_DIR=$2 ; shift 2
+ ;;
+ --installed-lib-dir)
+ INSTALLED_LIB_DIR=$2 ; shift 2
+ ;;
+ --bin-dir)
+ BIN_DIR=$2 ; shift 2
+ ;;
+ --examples-dir)
+ EXAMPLES_DIR=$2 ; shift 2
+ ;;
+ --)
+ shift ; break
+ ;;
+ *)
+ echo "Unknown option: $1"
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+for var in PREFIX BUILD_DIR ; do
+ if [ -z "$(eval "echo \$$var")" ]; then
+ echo Missing param: $var
+ usage
+ fi
+done
+
+MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
+DOC_DIR=${DOC_DIR:-/usr/share/doc/flume-ng}
+FLUME_DIR=${FLUME_DIR:-/usr/lib/flume-ng}
+BIN_DIR=${BIN_DIR:-/usr/lib/flume-ng/bin}
+CONF_DIR=/etc/flume-ng/
+CONF_DIST_DIR=/etc/flume-ng/conf.dist/
+ETC_DIR=${ETC_DIR:-/etc/flume-ng}
+
+install -d -m 0755 ${PREFIX}/${FLUME_DIR}
+
+(cd ${PREFIX}/${FLUME_DIR} &&
+ tar --strip-components=1 -xvzf
${BUILD_DIR}/flume-ng-dist/target/flume-ng-dist-*-dist.tar.gz)
+
+# Take out things we've installed elsewhere
+for x in flume-ng-* conf pom.xml CHANGELOG DEVNOTES DISCLAIMER LICENSE NOTICE
README RELEASE-NOTES; do
+ rm -rf ${PREFIX}/$FLUME_DIR/$x
+done
+
+
+wrapper=$PREFIX/usr/bin/flume-ng
+mkdir -p `dirname $wrapper`
+cat > $wrapper <<EOF
+#!/bin/bash
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+if [ -n "\$FLUME_PID_FILE" ]; then
+ echo \$$ > \$FLUME_PID_FILE
+fi
+
+# See FLUME-920
+bash exec /usr/lib/flume-ng/bin/flume-ng "\$@"
+EOF
+chmod 755 $wrapper
+
+
+install -d -m 0755 $PREFIX/$ETC_DIR/conf.empty
+(cd ${BUILD_DIR}/conf && tar cf - .) | (cd $PREFIX/$ETC_DIR/conf.empty && tar
xf -)
+touch $PREFIX/$ETC_DIR/conf.empty/flume.conf
+
+unlink $PREFIX/$FLUME_DIR/conf || /bin/true
+ln -s /etc/flume-ng/conf $PREFIX/$FLUME_DIR/conf
+
+# Docs
+install -d -m 0755 $PREFIX/${DOC_DIR}
+cp -r CHANGELOG DEVNOTES DISCLAIMER LICENSE NOTICE README RELEASE-NOTES
$PREFIX/${DOC_DIR}
+
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/changelog
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/changelog?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/changelog
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/changelog
Sat Jan 7 00:11:37 2012
@@ -0,0 +1 @@
+--- This is auto-generated
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/compat
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/compat?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/compat
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/compat
Sat Jan 7 00:11:37 2012
@@ -0,0 +1 @@
+6
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/control
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/control?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/control
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/control
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,42 @@
+# 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.
+
+Source: flume-ng
+Section: misc
+Priority: extra
+Maintainer: Bigtop <[email protected]>
+Build-Depends: debhelper (>= 6), ant, ant-optional
+Standards-Version: 3.8.0
+Homepage: http://incubator.apache.org/projects/flume.html
+
+Package: flume-ng
+Architecture: all
+Depends: adduser, hadoop, bigtop-utils
+Description: reliable, scalable, and manageable distributed data collection
application
+ Flume is a reliable, scalable, and manageable distributed data collection
+ application for collecting data such as logs and delivering it to data stores
+ such as Hadoop's HDFS. It can efficiently collect, aggregate, and move large
+ amounts of log data. It has a simple, but flexible, architecture based on
+ streaming data flows. It is robust and fault tolerant with tunable
reliability
+ mechanisms and many failover and recovery mechanisms. The system is centrally
+ managed and allows for intelligent dynamic management. It uses a simple
+ extensible data model that allows for online analytic applications.
+
+Package: flume-ng-node
+Architecture: all
+Depends: flume-ng (= ${source:Version})
+Description: core element of Flume's data path that collects and delivers data
+ The Flume node daemon is a core element of flume's data path and is
+ responsible for generating, processing, and delivering data.
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/copyright
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/copyright?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/copyright
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/copyright
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://incubator.apache.org/projects/flume.html
+Upstream-Name: Flume
+
+Files: *
+Copyright: 2010, Cloudera, Inc.
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2011, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng-node.postinst
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng-node.postinst?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng-node.postinst
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng-node.postinst
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,26 @@
+#!/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.
+
+set -e
+if [ -x "/etc/init.d/flume-node" ]; then
+ update-rc.d flume-node defaults >/dev/null
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d flume-node start || :
+ else
+ /etc/init.d/flume-node start || :
+ fi
+fi
+
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.docs
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.docs?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.docs
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.docs
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,7 @@
+CHANGELOG
+DEVNOTES
+DISCLAIMER
+LICENSE
+NOTICE
+README
+RELEASE-NOTES
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.postinst
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.postinst?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.postinst
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.postinst
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,38 @@
+#!/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.
+
+# postinst script for flume
+
+set -e
+
+case "$1" in
+ configure)
+ # Install config alternatives
+ update-alternatives --install /etc/flume/conf flume-conf
/etc/flume/conf.empty 30
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.preinst
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.preinst?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.preinst
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.preinst
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,63 @@
+#!/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.
+#
+# preinst script for flume
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ if ! getent passwd flume >/dev/null; then
+ # Adding system user: flume .
+ adduser \
+ --system \
+ --group \
+ --home /var/run/flume \
+ --gecos "Flume User" \
+ --shell /bin/false \
+ flume >/dev/null
+ fi
+ install -d -m 0755 -o flume -g flume /var/run/flume
+ install -d -m 0755 -o flume -g flume /var/log/flume
+ ;;
+
+ 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
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.prerm
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.prerm?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.prerm
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/flume-ng.prerm
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,57 @@
+#!/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.
+
+# prerm script for hadoop
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --remove flume-conf /etc/flume/conf.empty || :
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm 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
+
+
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+#
+# 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.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+build_version=${FLUME_VERSION}
+
+patch: patch-stamp
+patch-stamp:
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f *-stamp
+ dh_clean
+ rm -Rf debian/tmp debian/flume-ng
+ find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+ # No easy way to disable the default RAT run which fails the build
because of some fails in the debian/ directory
+ rm -rf bigtop-empty
+ mkdir -p bigtop-empty
+ # I could not find a way to add debian/ to RAT exclude list through cmd
line
+ # or to unbind rat:check goal
+ # So I am redirecting its attention with a decoy
+ env FLUME_VERSION=$(build_version) \
+ sh debian/do-component-build -Drat.basedir=${PWD}/bigtop-empty
-Dmaven.repo.local=${HOME}/.m2/repository
+ touch $@
+
+install: install-indep
+install-indep:
+ dh_testdir
+ dh_testroot
+ sh -x debian/install_flume-ng.sh \
+ --build-dir=${PWD} \
+ --prefix=debian/flume-ng
+ # Remove hadoop dependency and instead symlink in the hadoop jar
+ rm debian/flume-ng/usr/lib/flume-ng/lib/hadoop-core-*
+ ln -s /usr/lib/hadoop/hadoop-common.jar
debian/flume-ng/usr/lib/flume-ng/lib/hadoop-common.jar
+ ln -s /usr/lib/hadoop/hadoop-auth.jar
debian/flume-ng/usr/lib/flume-ng/lib/hadoop-auth.jar
+ dh_install -i
+
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_installinit
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-indep: build-indep install-indep
+ $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+binary-arch:
+binary: binary-indep
+.PHONY: build clean binary-indep binary install-indep binary-arc
Propchange:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/flume-ng/rules
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/RPMS/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/RPMS/.gitignore?rev=1228509&view=auto
==============================================================================
(empty)
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/flume-ng.spec
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/flume-ng.spec?rev=1228509&view=auto
==============================================================================
---
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/flume-ng.spec
(added)
+++
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SPECS/flume-ng.spec
Sat Jan 7 00:11:37 2012
@@ -0,0 +1,174 @@
+# 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.
+%define etc_flume /etc/flume-ng/conf
+%define bin_flume %{_bindir}
+%define man_flume %{_mandir}
+%define lib_flume /usr/lib/flume-ng
+%define log_flume /var/log/flume-ng
+
+%if %{?suse_version:1}0
+
+# Only tested on openSUSE 11.4. le'ts update it for previous release when
confirmed
+%if 0%{suse_version} > 1130
+%define suse_check \# Define an empty suse_check for compatibility with older
sles
+%endif
+
+# SLES is more strict and check all symlinks point to valid path
+# But we do point to a hadoop jar which is not there at build time
+# (but would be at install time).
+# Since our package build system does not handle dependencies,
+# these symlink checks are deactivated
+%define __os_install_post \
+ %{suse_check} ; \
+ /usr/lib/rpm/brp-compress ; \
+ %{nil}
+
+%define doc_flume %{_docdir}/flume-ng
+%define alternatives_cmd update-alternatives
+%global initd_dir %{_sysconfdir}/rc.d
+
+%else
+
+%define doc_flume %{_docdir}/flume-ng-%{flume_ng_version}
+%define alternatives_cmd alternatives
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+
+%endif
+
+
+
+Name: flume-ng
+Version: %{flume_ng_version}
+Release: %{flume_ng_release}
+Summary: Flume is a reliable, scalable, and manageable distributed log
collection application for collecting data such as logs and delivering it to
data stores such as Hadoop's HDFS.
+URL: http://incubator.apache.org/projects/flume.html
+Group: Development/Libraries
+Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
+BuildArch: noarch
+License: APL2
+Source0: %{name}-%{flume_ng_base_version}.tar.gz
+Source1: do-component-build
+Source2: install_%{name}.sh
+Source3: %{name}-node.init
+Requires: coreutils, /usr/sbin/useradd, hadoop
+Requires: bigtop-utils
+BuildRequires: ant xml-commons xml-commons-apis
+
+%if 0%{?mgaversion}
+Requires: bsh-utils
+%else
+Requires: sh-utils
+%endif
+
+%description
+Flume is a reliable, scalable, and manageable distributed data collection
application for collecting data such as logs and delivering it to data stores
such as Hadoop's HDFS. It can efficiently collect, aggregate, and move large
amounts of log data. It has a simple, but flexible, architecture based on
streaming data flows. It is robust and fault tolerant with tunable reliability
mechanisms and many failover and recovery mechanisms. The system is centrally
managed and allows for intelligent dynamic management. It uses a simple
extensible data model that allows for online analytic applications.
+
+%package node
+Summary: The flume node daemon is a core element of flume's data path and is
responsible for generating, processing, and delivering data.
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}, /sbin/service
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+
+%if %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%endif
+
+%if 0%{?mgaversion}
+# Required for init scripts
+Requires: initscripts
+%endif
+
+# CentOS 5 does not have any dist macro
+# So I will suppose anything that is not Mageia or a SUSE will be a
RHEL/CentOS/Fedora
+%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# Required for init scripts
+Requires: redhat-lsb
+%endif
+
+%description node
+Flume is a reliable, scalable, and manageable distributed data collection
application for collecting data such as logs and delivering it to data stores
such as Hadoop's HDFS. It can efficiently collect, aggregate, and move large
amounts of log data. It has a simple, but flexible, architecture based on
streaming data flows. It is robust and fault tolerant with tunable reliability
mechanisms and many failover and recovery mechanisms. The system is centrally
managed and allows for intelligent dynamic management. It uses a simple
extensible data model that allows for online analytic applications.
+
+%prep
+%setup -n flume-%{flume_ng_base_version}
+
+%build
+env FLUME_VERSION=%{version} sh %{SOURCE1}
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+sh %{SOURCE2} \
+ --build-dir=$PWD \
+ --prefix=$RPM_BUILD_ROOT \
+ --doc-dir=%{doc_flume}
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
+
+
+# Install init script
+init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-node
+%__cp %{SOURCE3} $init_file
+chmod 755 $init_file
+
+
+%__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
+
+# Get rid of hadoop jar, and instead link to installed hadoop
+rm $RPM_BUILD_ROOT/usr/lib/flume-ng/lib/hadoop-*
+ln -s /usr/lib/hadoop/hadoop-common.jar
$RPM_BUILD_ROOT/usr/lib/flume-ng/lib/hadoop-common.jar
+ln -s /usr/lib/hadoop/hadoop-auth.jar
$RPM_BUILD_ROOT/usr/lib/flume-ng/lib/hadoop-auth.jar
+
+%pre
+getent group flume >/dev/null || groupadd -r flume
+getent passwd flume >/dev/null || useradd -c "Flume" -s /sbin/nologin -g flume
-r -d /var/run/flume-ng flume 2> /dev/null || :
+%__install -d -o flume -g flume -m 0755 /var/run/flume-ng
+%__install -d -o flume -g flume -m 0755 /var/log/flume-ng
+
+# Manage configuration symlink
+%post
+%{alternatives_cmd} --install %{etc_flume} %{name}-conf %{etc_flume}.empty 30
+
+%preun
+if [ "$1" = 0 ]; then
+ %{alternatives_cmd} --remove %{name}-conf %{etc_flume}.empty || :
+fi
+
+%post node
+chkconfig --add %{name}-node
+
+%preun node
+if [ $1 = 0 ] ; then
+ service %{name}-node stop > /dev/null 2>&1
+ chkconfig --del %{name}-node
+fi
+%postun node
+if [ $1 -ge 1 ]; then
+ service %{name}-node condrestart >/dev/null 2>&1
+fi
+
+
+%files
+%defattr(-,flume,flume)
+%config(noreplace) %{etc_flume}.empty
+%doc %{doc_flume}
+
+%attr(0755,root,root) %{bin_flume}
+%attr(0755,root,root) %{lib_flume}
+
+%files node
+%attr(0755,root,root)/%{initd_dir}/%{name}-node
+%dir %{lib_flume}/bin
+%dir %{lib_flume}
Added:
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SRPMS/.gitignore
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/flume-ng/SRPMS/.gitignore?rev=1228509&view=auto
==============================================================================
(empty)
Modified: incubator/bigtop/branches/hadoop-0.23/bigtop.mk
URL:
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop.mk?rev=1228509&r1=1228508&r2=1228509&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop.mk (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop.mk Sat Jan 7 00:11:37 2012
@@ -145,6 +145,18 @@ FLUME_TARBALL_SRC=$(FLUME_TARBALL_DST)
FLUME_SITE=http://github.com/downloads/cloudera/flume/
$(eval $(call PACKAGE,flume,FLUME))
+# Flume NG
+FLUME_NG_NAME=flume-ng
+FLUME_NG_RELNOTES_NAME=Flume NG
+FLUME_NG_PKG_NAME=flume-ng
+FLUME_NG_BASE_VERSION=1.0.0-incubating
+FLUME_NG_PKG_VERSION=1.0.0
+FLUME_NG_RELEASE_VERSION=1
+FLUME_NG_TARBALL_DST=$(FLUME_NG_NAME)-$(FLUME_NG_BASE_VERSION).tar.gz
+FLUME_NG_TARBALL_SRC=flume-$(FLUME_NG_BASE_VERSION).tar.gz
+FLUME_NG_SITE=$(APACHE_MIRROR)/incubator/flume/flume-$(FLUME_NG_BASE_VERSION)/
+$(eval $(call PACKAGE,flume-ng,FLUME_NG))
+
# Bigtop-utils
BIGTOP_UTILS_NAME=bigtop-utils
BIGTOP_UTILS__RELNOTES_NAME=Bigtop-utils