incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aba...@apache.org
Subject svn commit: r1148501 [5/47] - in /incubator/bigtop: branches/ tags/ trunk/ trunk/docs/ trunk/src/ trunk/src/pkg/ trunk/src/pkg/common/ trunk/src/pkg/common/flume/ trunk/src/pkg/common/hadoop/ trunk/src/pkg/common/hadoop/conf.pseudo/ trunk/src/pkg/commo...
Date Tue, 19 Jul 2011 19:45:54 GMT
Added: incubator/bigtop/trunk/src/pkg/deb/hive/install_init_scripts.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/hive/install_init_scripts.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/hive/install_init_scripts.sh (added)
+++ incubator/bigtop/trunk/src/pkg/deb/hive/install_init_scripts.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+SRC_PKG=hadoop-hive
+for node in server metastore ; do
+    service_pkgdir=debian/$SRC_PKG-$node
+    debdir=$service_pkgdir/DEBIAN
+    template="debian/service-init.d.tpl"
+
+    mkdir -p $service_pkgdir/etc/init.d/ $service_pkgdir/etc/default/ $debdir
+    sed -e "s|@HIVE_DAEMON@|$node|" $template > $service_pkgdir/etc/init.d/$SRC_PKG-$node
+    sed -e "s|@HIVE_DAEMON@|$node|" debian/hadoop-hive.default > $service_pkgdir/etc/default/$SRC_PKG-$node 
+    sed -e "s|@HIVE_DAEMON@|$node|" debian/service-postinst.tpl > $debdir/postinst
+    sed -e "s|@HIVE_DAEMON@|$node|" debian/service-postrm.tpl > $debdir/postrm
+    chmod 755 $debdir/postinst $debdir/postrm $service_pkgdir/etc/init.d*
+
+    mkdir -p $service_pkgdir/usr/share/lintian/overrides
+    echo "$SRC_PKG-$node: new-package-should-close-itp-bug" > $service_pkgdir/usr/share/lintian/overrides/$SRC_PKG-$node
+
+done

Propchange: incubator/bigtop/trunk/src/pkg/deb/hive/install_init_scripts.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/hive/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/hive/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/hive/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/hive/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,79 @@
+#!/usr/bin/make -f
+# -*- 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
+
+clean:	
+	dh_testdir
+	dh_testroot
+	ant -f src/build.xml clean
+	rm -f *-stamp
+	rm -Rf debian/.ivy
+	dh_clean
+
+build-indep: build-indep-stamp
+build-indep-stamp:
+	mkdir -p /tmp/debian-hive/.ivy
+	ant -f src/build.xml -Divy.home=`pwd`/debian/.ivy package
+	touch $@
+
+install: install-indep
+install-indep:	
+	dh_testdir
+	dh_testroot
+	dh_clean -k -i
+	dh_installdirs -i
+	cp debian/hive-site.xml .
+	cp debian/hive.1 .
+	sh debian/install_hive.sh \
+	  --prefix=debian/hadoop-hive \
+	  --build-dir=src/build/dist \
+	  --doc-dir=debian/hadoop-hive/usr/share/doc/hive \
+	  --python-dir=debian/python-hive/usr/share/python-support/python-hive/hive
+	dh_pysupport
+	dh_install -i
+	sh debian/install_init_scripts.sh
+	ls -ld debian/hadoop-hive/var/lib/hive/metastore
+	(dh_lintian) || /bin/true
+
+binary-common:	
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+	dh_makeshlibs
+	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-arch

Propchange: incubator/bigtop/trunk/src/pkg/deb/hive/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/hive/service-init.d.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/hive/service-init.d.tpl?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/hive/service-init.d.tpl (added)
+++ incubator/bigtop/trunk/src/pkg/deb/hive/service-init.d.tpl Tue Jul 19 19:44:48 2011
@@ -0,0 +1,171 @@
+#! /bin/bash
+#
+# skeleton  example file to build /etc/init.d/ scripts.
+#    This file should be used to construct scripts for /etc/init.d.
+#
+#    Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#    Modified for Debian
+#    by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#               Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# Version:  @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+#
+### BEGIN INIT INFO
+# Provides:          hive-@HIVE_DAEMON@
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $remote_fs
+# Should-Start:      $named
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: hive
+### END INIT INFO
+
+# Modelled after $HADOOP_HOME/bin/hadoop-daemon.sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+SYS_FILE="/etc/default/hadoop-hive-@HIVE_DAEMON@"
+EXE_FILE="/usr/lib/hive/bin/hive"
+PID_FILE="/var/run/hive/hive-@HIVE_DAEMON@.pid"
+LOG_FILE="/var/log/hive/hive-@HIVE_DAEMON@.log"
+HIVE_USER="hive"
+NICENESS="0"
+NAME="hadoop-hive-@HIVE_DAEMON@"
+DESC="Hive daemon"
+ 
+DODTIME=3
+SLAVE_TIMEOUT=300
+
+[ -f $SYS_FILE ] && . $SYS_FILE
+
+hive_die() {
+    echo "$@"
+    exit 1
+}
+hive_is_process_alive() {
+    local pid="$1"
+    kill -0 $pid > /dev/null 2>&1
+}
+hive_check_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+    # The file probably does not exist or is empty. 
+	return 1
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+    hive_is_process_alive $pid
+}
+hive_process_kill() {
+    local pid="$1"    # IN
+    local signal="$2" # IN
+    local second
+
+    kill -$signal $pid 2>/dev/null
+
+    for second in 0 1 2 3 4 5 6 7 8 9 10; do
+      hive_is_process_alive "$pid" || return 0
+      sleep 1
+    done
+
+    return 1
+}
+hive_stop_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+      # The file probably does not exist or is empty. Success
+	return 0
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+    # First try the easy way
+    if hive_process_kill "$pid" 15; then
+	return 0
+    fi
+
+    # Otherwise try the hard way
+    if hive_process_kill "$pid" 9; then
+	return 0
+    fi
+
+    return 1
+}
+
+hive_start() {
+    if hive_check_pidfile $PID_FILE ; then
+      exit 0
+    fi
+
+    service_name="@HIVE_DAEMON@"
+    if [ $service_name = "server" ] ; then
+      service_name="hiveserver"
+      exec_env="HADOOP_OPTS=\"-Dhive.log.dir=`dirname $LOG_FILE`\""
+    fi
+    echo starting $EXE_FILE, logging to $LOG_FILE
+    su -s /bin/sh $HIVE_USER \
+       -c "$exec_env nohup nice -n $NICENESS       \
+           $EXE_FILE --service $service_name $PORT \
+             > $LOG_FILE 2>&1 < /dev/null & "'echo $! '"> $PID_FILE"
+    sleep 3
+
+    hive_check_pidfile $PID_FILE || hive_die "failed to start @HIVE_DAEMON@"
+}
+hive_stop() {
+    if [ -f $PID_FILE ]; then
+      hive_stop_pidfile $PID_FILE || hive_die "failed to stop metastore"
+      rm $PID_FILE  
+    fi
+}
+hive_restart() {
+    hive_stop
+    [ -n "$DODTIME" ] && sleep $DODTIME
+    hive_start
+}
+hive_status() {
+    echo -n "$NAME is "
+    if hive_check_pidfile $PID_FILE ;  then
+     echo "running"
+    else
+     echo "not running"
+     exit 1
+    fi
+}
+
+case "$1" in
+    start)
+      hive_start
+      ;;
+
+    stop|force-stop)
+      hive_stop
+      ;; 
+
+    force-reload|condrestart|try-restart)
+      hive_check_pidfile $PID_FILE && hive_restart
+      ;;
+
+    restart|reload)
+      hive_restart
+      ;;
+  
+    status)
+      hive_status
+      ;;
+
+    *)
+	N=/etc/init.d/$NAME
+        echo "Usage: $N {start|stop|restart|reload|condrestart|try-restart|force-reload|status|force-stop}" >&2
+
+	exit 1
+	;;
+esac

Propchange: incubator/bigtop/trunk/src/pkg/deb/hive/service-init.d.tpl
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/hive/service-postinst.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/hive/service-postinst.tpl?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/hive/service-postinst.tpl (added)
+++ incubator/bigtop/trunk/src/pkg/deb/hive/service-postinst.tpl Tue Jul 19 19:44:48 2011
@@ -0,0 +1,24 @@
+#!/bin/sh
+# postinst script for hive
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    configure)
+        update-rc.d hadoop-hive-@HIVE_DAEMON@ defaults >/dev/null || exit 1
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
+
+

Added: incubator/bigtop/trunk/src/pkg/deb/hive/service-postrm.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/hive/service-postrm.tpl?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/hive/service-postrm.tpl (added)
+++ incubator/bigtop/trunk/src/pkg/deb/hive/service-postrm.tpl Tue Jul 19 19:44:48 2011
@@ -0,0 +1,26 @@
+#!/bin/sh
+# postrm script for hive
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    purge)
+        update-rc.d -f hadoop-hive-@HIVE_DAEMON@ remove > /dev/null || exit 1
+    ;;
+    upgrade)
+        service hadoop-hive-@HIVE_DAEMON@ condrestart >/dev/null || :
+    ;;
+    remove|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
+
+

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/changelog?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/changelog (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/changelog Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/compat?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/compat (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/compat Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+6

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,57 @@
+Source: oozie
+Section: misc
+Priority: extra
+Maintainer: Arvind Prabhakar <arvind@cloudera.com>
+Build-Depends: debhelper (>= 6)
+Depends: zip, unzip, sun-java6-jre, sun-java6-bin
+Standards-Version: 3.8.0
+Homepage: http://archive.cloudera.com/cdh/3/oozie
+
+Package: oozie-client
+Architecture: all
+Description: Command line utility that allows
+ remote access and operation of oozie. Using this utility, the
+ user can deploy workflows and perform other administrative and
+ monitoring tasks such as start, stop, kill, resume workflows
+ and coordinator jobs.
+
+Package: oozie
+Architecture: all
+Depends: oozie-client (= ${source:Version})
+Description: A workflow and coordinator sytem for Hadoop jobs.
+ Oozie workflows are actions arranged in a control dependency DAG (Direct
+ Acyclic Graph).
+ .
+ Oozie coordinator functionality allows to start workflows at regular
+ frequencies and when data becomes available in HDFS.
+ .
+ An Oozie workflow may contain the following types of actions nodes:
+ map-reduce, map-reduce streaming, map-reduce pipes, pig, file-system,
+ sub-workflows, java, hive, sqoop and ssh (deprecated).
+ .
+ Flow control operations within the workflow can be done using decision,
+ fork and join nodes. Cycles in workflows are not supported.
+ .
+ Actions and decisions can be parameterized with job properties, actions
+ output (i.e. Hadoop counters) and HDFS  file information (file exists,
+ file size, etc). Formal parameters are expressed in the workflow definition
+ as ${VAR} variables.
+ .
+ A Workflow application is an HDFS directory that contains the workflow
+ definition (an XML file), all the necessary files to run all the actions:
+ JAR files for Map/Reduce jobs, shells for streaming Map/Reduce jobs, native
+ libraries, Pig scripts, and other resource files.
+ .
+ Running workflow jobs is done via command line tools, a WebServices API or
+ a Java API.
+ .
+ Monitoring the system and workflow jobs can be done via a web console, the
+ command line tools, the WebServices API and the Java API.
+ .
+ Oozie is a transactional system and it has built in automatic and manual
+ retry capabilities.
+ .
+ In case of workflow job failure, the workflow job can be rerun skipping
+ previously completed actions, the workflow application can be patched before
+ being rerun.
+

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,15 @@
+This package was debianized by Arvind Prabhakar <arvind@cloudera.com> on
+Thu, 17 Jun 2010 00:33:33 -0400.
+
+The upstream package is from <http://wiki.github.com/tucu00/oozie1/>
+The Cloudera Distribution for Hadoop is from <http://cloudera.com/distribution>
+
+License:
+    Apache 2.0 - see /usr/share/common-licenses/Apache-2.0
+
+This Debian Package contains the Cloudera Distribution for Hadoop.
+This distribution is Copyright 2010, Cloudera, Inc. and is licensed under
+the Apache 2.0 License as above. See http://cloudera.com/distribution
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,37 @@
+#!/bin/sh
+# postinst script for oozie 
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        chown -R oozie:oozie /var/lib/oozie
+        update-rc.d oozie defaults >/dev/null || exit 1
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
+

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postrm
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postrm?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postrm (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.postrm Tue Jul 19 19:44:48 2011
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postrm script for oozie
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    purge)
+       rm -rf /etc/oozie
+       rm -rf /var/lib/oozie
+       rm -rf /var/run/oozie
+       rm -rf /var/tmp/oozie
+       rm -rf /var/log/oozie
+       update-rc.d -f oozie remove > /dev/null || exit 1
+    ;;
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
+

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.preinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.preinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/oozie.preinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,46 @@
+#!/bin/sh
+# preinst script for oozie
+#
+# 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 oozie >/dev/null; then
+                # Adding system user: oozie.
+                adduser \
+                  --system \
+                  --disabled-login \
+                  --group \
+                  --home /var/run/oozie \
+                  --gecos "Oozie User" \
+                  --shell /bin/false \
+                  oozie  >/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

Added: incubator/bigtop/trunk/src/pkg/deb/oozie/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/oozie/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/oozie/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/oozie/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,72 @@
+#!/usr/bin/make -f
+# -*- 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
+
+ifneq "$(wildcard ${HOME}/.m2/settings.xml)" ""
+	m2_settings_flag=--settings ${HOME}/.m2/settings.xml
+else
+	m2_settings_flag=
+endif
+
+patch: patch-stamp
+patch-stamp:	
+	touch $@
+
+clean:	
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp
+	dh_clean
+	rm -Rf debian/tmp debian/oozie
+	find debian -name .\*swp -exec rm -f {} \;
+
+
+# we need to set 'maven.repo.local' otherwise the build with
+# fakeroot fails because it tries to use /root/.m2
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+#	M2_CACHE=`mktemp -d /tmp/oozie.m2.XXXXX`
+	mkdir -p distro/downloads
+	(export DO_MAVEN_DEPLOY=""; export FULL_VERSION=2.3.1; sh -x debian/do-release-build -Dmaven.repo.local=${HOME}/.m2/repository ${m2_settings_flag} -DskipTests)
+#	rm -rf ${M2_CACHE}
+	mkdir -p debian/tmp
+	tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
+	touch $@
+
+install: install-indep
+install-indep:
+	dh_testdir
+	dh_testroot
+	sh -x debian/create-package-layout --extra-dir=debian/ --build-dir=. --server-dir=./debian/oozie --client-dir=./debian/oozie-client --docs-dir=./debian/oozie-client/usr/share/doc/oozie --initd-dir=./debian/oozie/etc/init.d
+	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/trunk/src/pkg/deb/oozie/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/pig/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/changelog?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/changelog (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/changelog Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: incubator/bigtop/trunk/src/pkg/deb/pig/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/compat?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/compat (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/compat Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+6

Added: incubator/bigtop/trunk/src/pkg/deb/pig/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,32 @@
+Source: hadoop-pig
+Section: misc
+Priority: extra
+Maintainer: Todd Lipcon <todd@cloudera.com>
+Build-Depends: debhelper (>= 6), ant, sun-java6-jdk, ant-optional, git-core
+Standards-Version: 3.8.0
+Homepage: http://hadoop.apache.org/pig/
+
+Package: hadoop-pig
+Architecture: all
+Depends: sun-java6-jre, hadoop
+Description: A platform for analyzing large data sets using Hadoop
+ Pig is a platform for analyzing large data sets that consists of a high-level language
+ for expressing data analysis programs, coupled with infrastructure for evaluating these
+ programs. The salient property of Pig programs is that their structure is amenable
+ to substantial parallelization, which in turns enables them to handle very large data sets.
+ .
+ At the present time, Pig's infrastructure layer consists of a compiler that produces
+ sequences of Map-Reduce programs, for which large-scale parallel implementations already
+ exist (e.g., the Hadoop subproject). Pig's language layer currently consists of a textual
+ language called Pig Latin, which has the following key properties:
+ .
+ * Ease of programming
+    It is trivial to achieve parallel execution of simple, "embarrassingly parallel" data
+    analysis tasks. Complex tasks comprised of multiple interrelated data transformations
+    are explicitly encoded as data flow sequences, making them easy to write, understand,
+    and maintain.
+ * Optimization opportunities
+    The way in which tasks are encoded permits the system to optimize their execution
+    automatically, allowing the user to focus on semantics rather than efficiency.
+ * Extensibility
+    Users can create their own functions to do special-purpose processing. 

Added: incubator/bigtop/trunk/src/pkg/deb/pig/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,15 @@
+This package was debianized by Todd Lipcon <todd@cloudera.com> on
+Tue, 24 Mar 2009 00:33:33 -0400.
+
+The upstream package is from <http://hadoop.apache.org/pig>
+The Cloudera Distribution for Hadoop is from <http://cloudera.com/distribution>
+
+License:
+    Apache 2.0 - see /usr/share/common-licenses/Apache-2.0
+
+This Debian Package contains the Cloudera Distribution for Hadoop.
+This distribution is Copyright 2009, Cloudera, Inc. and is licensed under
+the Apache 2.0 License as above. See http://cloudera.com/distribution
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).

Added: incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.postinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.postinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.postinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,20 @@
+#!/bin/sh
+# postinst script for pig
+
+set -e
+
+case "$1" in
+    configure)
+        update-alternatives --install /etc/pig/conf pig-conf /etc/pig/conf.dist 30
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#

Added: incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.preinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.preinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/hadoop-pig.preinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,39 @@
+#!/bin/sh
+# preinst script for pig
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this scVript 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)
+        # workaround for https://issues.cloudera.org/browse/DISTRO-223
+        if [ "$2" -a -d /usr/lib/pig/conf ]; then
+          mv /usr/lib/pig/conf /usr/lib/pig/conf.old.`date +'%s'` || :
+        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

Added: incubator/bigtop/trunk/src/pkg/deb/pig/pig.dirs
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/pig.dirs?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/pig.dirs (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/pig.dirs Tue Jul 19 19:44:48 2011
@@ -0,0 +1,2 @@
+/usr/lib/pig
+/usr/bin

Added: incubator/bigtop/trunk/src/pkg/deb/pig/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/pig/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/pig/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/pig/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,80 @@
+#!/usr/bin/make -f
+# -*- 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
+
+patch: patch-stamp
+patch-stamp:	
+	touch $@
+
+clean:	
+	dh_testdir
+	dh_testroot
+	ant clean
+	rm -f *-stamp
+	dh_clean
+	rm -Rf debian/tmp debian/hadoop-pig debian/pig
+	find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+	ant -Divy.home=`pwd`/debian/.ivy -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -Ddist.dir=debian/tmp package
+	touch $@
+
+install: install-indep
+install-indep:	
+	dh_testdir
+	dh_testroot
+	
+	cp debian/*.properties .
+	cp debian/pig.1 .
+	sh -x debian/install_pig.sh \
+	  --build-dir=debian/tmp \
+	  --prefix=debian/hadoop-pig \
+          --doc-dir=debian/hadoop-pig/usr/share/doc/hadoop-pig \
+          --examples-dir=debian/hadoop-pig/usr/share/doc/hadoop-pig/examples
+
+	dh_install -i
+	(dh_lintian) || /bin/true
+
+binary-common:	
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+	dh_makeshlibs
+	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-arch

Propchange: incubator/bigtop/trunk/src/pkg/deb/pig/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/changelog?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/changelog (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/changelog Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/compat?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/compat (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/compat Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+6

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,21 @@
+Source: sqoop
+Section: misc
+Priority: extra
+Maintainer: Alex Newman <newalex@cloudera.com>
+Build-Depends: debhelper (>= 6), ant, sun-java6-jdk, ant-optional, git-core, sed, asciidoc, xmlto
+Standards-Version: 3.8.0
+Homepage: http://www.cloudera.com
+
+Package:  sqoop
+Architecture: all
+Depends: sun-java6-jre, hadoop
+Description: Tool for easy imports and exports of data sets between databases and HDFS
+ Sqoop is a tool that provides the ability to import and export data sets between
+ the Hadoop Distributed File System (HDFS) and relational databases.
+
+Package: sqoop-metastore
+Architecture: all
+Depends: sqoop (= ${source:Version}), adduser
+Description: Shared metadata repository for Sqoop.
+ This optional package hosts a metadata server for Sqoop clients across a network to use.
+

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,12 @@
+This package was debianized by Alex Newman <newalex@cloudera.com> on
+Mon, 22 Feb 2010 23:07:14 -0800
+
+The upstream package is from cloudera
+The Cloudera Distribution for Hadoop is from <http://cloudera.com/distribution>
+
+License:
+    Apache 2.0 - see /usr/share/common-licenses/Apache-2.0
+
+This Debian Package contains the Cloudera Distribution for Hadoop.
+This distribution is Copyright 2010, Cloudera, Inc. and is licensed under
+the Apache 2.0 License as above. See http://cloudera.com/distribution

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,59 @@
+#!/usr/bin/make -f
+# -*- 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
+
+patch: patch-stamp
+patch-stamp:	
+	touch $@
+
+clean:	
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp
+	dh_clean
+	rm -Rf debian/tmp debian/sqoop
+	find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+	ant -Divy.home=`pwd`/debian/.ivy -f build.xml package
+	touch $@
+
+install: install-indep
+install-indep:	
+	dh_testdir
+	dh_testroot
+	sh -x debian/install_sqoop.sh \
+	  --build-dir=. \
+	  --prefix=debian/sqoop
+	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/trunk/src/pkg/deb/sqoop/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.init?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.init (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.init Tue Jul 19 19:44:48 2011
@@ -0,0 +1,181 @@
+#!/bin/bash
+#
+# (c) Copyright 2009 Cloudera, Inc.
+#
+#   Licensed 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.
+# chkconfig: 2345 85 15
+# description: Sqoop allows easy imports and exports of data sets between \
+# databases and the Hadoop Distributed File System (HDFS). The Sqoop \
+# metastore allows users to define saved jobs for repeated execution and \
+# share them with other users of the cluster.
+# processname: java
+# pidfile: /var/run/sqoop/sqoop-metastore.pid
+### BEGIN INIT INFO
+# Provides:          Sqoop
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $remote_fs
+# Should-Start:      $named
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Sqoop allows easy imports and exports of data sets between databases and the Hadoop Distributed File System (HDFS).
+### END INIT INFO
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+NAME=sqoop-metastore
+DESC="Sqoop metastore"
+PID_FILE=/var/run/sqoop/sqoop-metastore.pid
+LOGDIR=/var/log/sqoop
+
+DODTIME=3
+
+# Returns 0 if pid is alive, 1 if not.
+hadoop_is_process_alive() {
+  local pid="$1"
+  ps -fp $pid | grep $pid | grep sqoop > /dev/null 2>&1
+}
+
+hadoop_check_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+    # The file probably does not exist or is empty. 
+	return 1
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+    hadoop_is_process_alive $pid
+}
+
+hadoop_process_kill() {
+    local pid="$1"    # IN
+    local signal="$2" # IN
+    local second
+
+    kill -$signal $pid 2>/dev/null
+
+   # Wait a bit to see if the dirty job has really been done
+    for second in 0 1 2 3 4 5 6 7 8 9 10; do
+	if hadoop_is_process_alive "$pid"; then
+         # Success
+	    return 0
+	fi
+
+	sleep 1
+    done
+
+   # Timeout
+    return 1
+}
+hadoop_stop_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+      # The file probably does not exist or is empty. Success
+	return 0
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+   # First try the easy way
+    if hadoop_process_kill "$pid" 15; then
+	return 0
+    fi
+
+   # Otherwise try the hard way
+    if hadoop_process_kill "$pid" 9; then
+	return 0
+    fi
+
+    return 1
+}
+
+
+start() {
+    # Pid files created in sqoop-specific directory under /var/run.
+    # The dir should be recreated first.
+    local piddir=`dirname "$PID_FILE"`
+    install -d -m 0755 -o sqoop -g sqoop "$piddir"
+    su -s /bin/sh sqoop -c \
+         "/usr/lib/sqoop/bin/start-metastore.sh -p $PID_FILE -l $LOGDIR"
+}
+stop() {
+    if hadoop_check_pidfile $PID_FILE ; then
+      su -s /bin/sh sqoop -c \
+          "/usr/lib/sqoop/bin/stop-metastore.sh -p $PID_FILE"
+    fi
+}
+
+case "$1" in
+    start)
+	start
+	;;
+    stop)
+	stop 
+	;;
+    force-stop)
+        echo -n "Forcefully stopping $DESC: "
+        hadoop_stop_pidfile $PID_FILE
+        if ! hadoop_check_pidfile $PID_FILE ; then
+            echo "$NAME."
+        else
+            echo "ERROR."
+        fi
+	rm $PID_FILE
+	;;
+    force-reload)
+  # check whether $DAEMON is running. If so, restart
+        hadoop_check_pidfile $PID_FILE && $0 restart
+	;;
+    restart)
+        echo -n "Restarting $DESC: "
+        stop
+        [ -n "$DODTIME" ] && sleep $DODTIME
+        $0 start
+	;;
+
+
+
+    restart|reload)
+        echo -n "Restarting $DESC: "
+        stop
+        [ -n "$DODTIME" ] && sleep $DODTIME
+        $0 start
+	;;
+    status)
+	echo -n "$NAME is "
+	if hadoop_check_pidfile $PID_FILE ;  then
+	    echo "running"
+	else
+	    echo "not running."
+	    exit 1
+	fi
+	;;
+
+    *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+	exit 1
+	;;
+esac
+
+exit 0

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.postinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.postinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.postinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,19 @@
+#!/bin/sh
+# postinst script for sqoop
+
+set -e
+
+case "$1" in
+    configure)
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#

Propchange: incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.postinst
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.preinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.preinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.preinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,47 @@
+#!/bin/sh
+# preinst script for sqoop-metastore
+#
+# 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 sqoop >/dev/null; then
+                # Adding system user: sqoop .
+                adduser \
+                  --system \
+                  --group \
+                  --home /var/lib/sqoop \
+                  --gecos "Sqoop User" \
+                  --shell /bin/false \
+                  sqoop >/dev/null
+        fi
+	install -d -m 0755 -o sqoop -g sqoop /var/lib/sqoop
+	install -d -m 0755 -o sqoop -g sqoop /var/log/sqoop
+    ;;
+
+    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

Propchange: incubator/bigtop/trunk/src/pkg/deb/sqoop/sqoop-metastore.preinst
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/whirr/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/whirr/changelog?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/whirr/changelog (added)
+++ incubator/bigtop/trunk/src/pkg/deb/whirr/changelog Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: incubator/bigtop/trunk/src/pkg/deb/whirr/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/whirr/compat?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/whirr/compat (added)
+++ incubator/bigtop/trunk/src/pkg/deb/whirr/compat Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+6

Added: incubator/bigtop/trunk/src/pkg/deb/whirr/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/whirr/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/whirr/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/whirr/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,20 @@
+Source: whirr
+Section: misc
+Priority: extra
+Maintainer: Tom White <tom@cloudera.com>
+Build-Depends: debhelper (>= 6), sun-java6-jdk, git-core
+Standards-Version: 3.8.0
+Homepage: http://incubator.apache.org/whirr
+
+Package:  whirr
+Architecture: all
+Depends: sun-java6-jre 
+Description: Scripts and libraries for running software services on cloud infrastructure
+ Whirr provides
+ .
+  * A cloud-neutral way to run services. You don't have to worry about the
+    idiosyncrasies of each provider.
+  * A common service API. The details of provisioning are particular to the
+    service.
+  * Smart defaults for services. You can get a properly configured system
+    running quickly, while still being able to override settings as needed.

Added: incubator/bigtop/trunk/src/pkg/deb/whirr/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/whirr/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/whirr/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/whirr/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,15 @@
+This package was debianized by Tom White <tom@cloudera.com> on
+Mon, 22 Feb 2010 23:07:14 -0800
+
+The upstream package is from cloudera
+The Cloudera Distribution for Hadoop is from <http://cloudera.com/distribution>
+
+License:
+    Apache 2.0 - see /usr/share/common-licenses/Apache-2.0
+
+This Debian Package contains the Cloudera Distribution for Hadoop.
+This distribution is Copyright 2010, Cloudera, Inc. and is licensed under
+the Apache 2.0 License as above. See http://cloudera.com/distribution
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).
\ No newline at end of file

Added: incubator/bigtop/trunk/src/pkg/deb/whirr/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/whirr/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/whirr/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/whirr/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+# -*- 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
+
+patch: patch-stamp
+patch-stamp:	
+	touch $@
+
+clean:	
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp
+	dh_clean
+	rm -Rf debian/tmp debian/whirr
+	find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+	# we'll just use the build from the tarball.
+	mkdir -p debian/tmp
+	# NOTE: FIXME me right away
+	cp -r debian/whirr.1 .
+	tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
+	touch $@
+
+install: install-indep
+install-indep:	
+	dh_testdir
+	dh_testroot
+	sh -x debian/install_whirr.sh \
+	  --build-dir=debian/tmp \
+	  --prefix=debian/whirr
+	(dh_lintian) || /bin/true
+
+binary-common:	
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+	dh_makeshlibs
+	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-arch

Propchange: incubator/bigtop/trunk/src/pkg/deb/whirr/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/changelog?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/changelog (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/changelog Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+--- This is auto-generated 

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/changelog
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/compat?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/compat (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/compat Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+6

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/compat
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,20 @@
+Source: hadoop-zookeeper
+Section: misc
+Priority: extra
+Maintainer: Alex Newman <newalex@cloudera.com>
+Build-Depends: debhelper (>= 6), ant, sun-java6-jdk, ant-optional, git-core, autoconf, automake, subversion
+Standards-Version: 3.8.0
+Homepage: http://hadoop.apache.org/zookeeper/
+
+Package: hadoop-zookeeper
+Architecture: all
+Depends: sun-java6-jre
+Conflicts: zookeeper
+Replaces: zookeeper
+Description: A high-performance coordination service for distributed applications.
+ ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.  All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
+
+Package: hadoop-zookeeper-server
+Architecture: all
+Depends: hadoop-zookeeper (= ${source:Version})
+Description: This runs the zookeeper server on startup.

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/control
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,15 @@
+This package was debianized by Alex Newman <newalex@cloudera.com> on
+Mon, 22 Feb 2010 23:07:14 -0800
+
+The upstream package is from <http://hadoop.apache.org/zookeeper>
+The Cloudera Distribution for Hadoop is from <http://cloudera.com/distribution>
+
+License:
+    Apache 2.0 - see /usr/share/common-licenses/Apache-2.0
+
+This Debian Package contains the Cloudera Distribution for Hadoop.
+This distribution is Copyright 2009, Cloudera, Inc. and is licensed under
+the Apache 2.0 License as above. See http://cloudera.com/distribution
+
+This product includes software developed by The Apache Software
+Foundation (http://www.apache.org/).

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/copyright
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper-server.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper-server.init?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper-server.init (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper-server.init Tue Jul 19 19:44:48 2011
@@ -0,0 +1,176 @@
+#!/bin/bash
+#
+# (c) Copyright 2009 Cloudera, Inc.
+#
+#   Licensed 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.
+# chkconfig: 2345 85 15
+# description: Summary: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
+# processname: java
+# pidfile: /var/run/zookeeper/zookeeper-server.pid
+### BEGIN INIT INFO
+# Provides:          hadoop-zookeeper-server
+# Required-Start:    $network $local_fs
+# Required-Stop:
+# Should-Start:      $named
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
+### END INIT INFO
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON_SCRIPT="/usr/bin/zookeeper-server"
+
+NAME=hadoop-zookeeper-server
+DESC="ZooKeeper daemon"
+PID_FILE=/var/run/zookeeper/zookeeper-server.pid
+install -d -m 0755 -o zookeeper -g zookeeper /var/run/zookeeper/
+
+
+DODTIME=3
+
+# Checks if the given pid represents a live process.
+# Returns 0 if the pid is a live process, 1 otherwise
+hadoop_is_process_alive() {
+  local pid="$1" 
+  ps -fp $pid | grep $pid | grep zookeeper > /dev/null 2>&1
+}
+
+hadoop_check_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+    # The file probably does not exist or is empty. 
+	return 1
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+    hadoop_is_process_alive $pid
+}
+
+hadoop_process_kill() {
+    local pid="$1"    # IN
+    local signal="$2" # IN
+    local second
+
+    kill -$signal $pid 2>/dev/null
+
+   # Wait a bit to see if the dirty job has really been done
+    for second in 0 1 2 3 4 5 6 7 8 9 10; do
+	if hadoop_is_process_alive "$pid"; then
+         # Success
+	    return 0
+	fi
+
+	sleep 1
+    done
+
+   # Timeout
+    return 1
+}
+hadoop_stop_pidfile() {
+    local pidfile="$1" # IN
+    local pid
+
+    pid=`cat "$pidfile" 2>/dev/null`
+    if [ "$pid" = '' ]; then
+      # The file probably does not exist or is empty. Success
+	return 0
+    fi
+    
+    set -- $pid
+    pid="$1"
+
+   # First try the easy way
+    if hadoop_process_kill "$pid" 15; then
+	return 0
+    fi
+
+   # Otherwise try the hard way
+    if hadoop_process_kill "$pid" 9; then
+	return 0
+    fi
+
+    return 1
+}
+
+
+start() {
+    su -s /bin/sh zookeeper -c "${DAEMON_SCRIPT} start"
+}
+stop() {
+	if hadoop_check_pidfile $PID_FILE ;  then
+        su -s /bin/sh zookeeper -c "${DAEMON_SCRIPT} stop"
+	fi
+}
+
+case "$1" in
+    start)
+	start
+	;;
+    stop)
+	stop 
+	;;
+    force-stop)
+        echo -n "Forcefully stopping $DESC: "
+        hadoop_stop_pidfile $PID_FILE
+        if hadoop_check_pidfile $PID_FILE ; then
+            echo "$NAME."
+        else
+            echo " ERROR."
+        fi
+	;;
+    force-reload)
+  # check wether $DAEMON is running. If so, restart
+        hadoop_check_pidfile $PID_FILE && $0 restart
+	;;
+    restart)
+        echo -n "Restarting $DESC: "
+        stop
+        [ -n "$DODTIME" ] && sleep $DODTIME
+        $0 start
+	;;
+
+
+
+    restart|reload)
+        echo -n "Restarting $DESC: "
+        stop
+        [ -n "$DODTIME" ] && sleep $DODTIME
+        $0 start
+	;;
+    status)
+	echo -n "$NAME is "
+	if hadoop_check_pidfile $PID_FILE ;  then
+	    echo "running"
+	else
+	    echo "not running."
+	    exit 1
+	fi
+	;;
+
+    *)
+	N=/etc/init.d/$NAME
+  # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+
+	exit 1
+	;;
+esac
+
+exit 0

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper-server.init
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.postinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.postinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.postinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,21 @@
+#!/bin/sh
+# postinst script for zookeeper
+
+set -e
+
+case "$1" in
+    configure)
+        # Install config alternatives
+        update-alternatives  --install /etc/zookeeper/conf hadoop-zookeeper-conf /etc/zookeeper/conf.dist 30
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.postinst
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.preinst?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.preinst (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.preinst Tue Jul 19 19:44:48 2011
@@ -0,0 +1,47 @@
+#!/bin/sh
+# preinst script for zookeeper
+#
+# 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 zookeeper >/dev/null; then
+                # Adding system user: zookeeper .
+                adduser \
+                  --system \
+                  --group \
+                  --home /var/zookeeper \
+                  --gecos "ZooKeeper User" \
+                  --shell /bin/false \
+                  zookeeper >/dev/null
+        fi
+	install -d -m 0755 -o zookeeper -g zookeeper /var/log/zookeeper
+        install -d -m 0755 -o zookeeper -g zookeeper /var/lib/zookeeper
+    ;;
+
+    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

Propchange: incubator/bigtop/trunk/src/pkg/deb/zookeeper/hadoop-zookeeper.preinst
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/deb/zookeeper/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/zookeeper/rules?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/zookeeper/rules (added)
+++ incubator/bigtop/trunk/src/pkg/deb/zookeeper/rules Tue Jul 19 19:44:48 2011
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# -*- 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
+
+patch: patch-stamp
+patch-stamp:	
+	touch $@
+
+clean:	
+	dh_testdir
+	dh_testroot
+	rm -f *-stamp
+	dh_clean
+	rm -Rf debian/tmp debian/hadoop-zookeeper debian/zookeeper
+	find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+	ant -f build.xml package -Divy.home=`pwd`/debian/.ivy 
+	mkdir -p debian/tmp
+	tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
+	touch $@
+
+install: install-indep
+install-indep:	
+	dh_testdir
+	dh_testroot
+	cp debian/zookeeper.1 .
+	sh -x debian/install_zookeeper.sh \
+	  --build-dir=. \
+	  --prefix=debian/hadoop-zookeeper 
+	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/trunk/src/pkg/deb/zookeeper/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/rpm/flume/RPMS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/flume/RPMS/.gitignore?rev=1148501&view=auto
==============================================================================
    (empty)

Added: incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d Tue Jul 19 19:44:48 2011
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# (c) Copyright 2010, 2011 Cloudera, Inc.
+#
+#   Licensed 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 @FLUME_DAEMON@
+#
+# chkconfig: 2345 90 10
+# description:       Flume @FLUME_DAEMON@
+# Provides:          flume-@FLUME_DAEMON@
+# Required-Start:    $syslog $remote_fs
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Flume @FLUME_DAEMON@
+
+source /etc/rc.d/init.d/functions
+
+desc="Flume @FLUME_DAEMON@ daemon"
+
+
+export FLUME_LOG_DIR=/var/log/flume
+export FLUME_HOME=/usr/lib/flume
+export FLUME_RUN=/var/run/flume
+export FLUME_PID=${FLUME_RUN}/flume-flume-@FLUME_DAEMON@.pid
+export DOTIME=3
+install -d -m 0755 -o flume -g flume ${FLUME_RUN}
+
+checkstatus(){
+  status -p ${FLUME_PID} flume
+  RETVAL=$?
+}
+
+start() {
+  echo -n $"Starting $desc (flume-@FLUME_DAEMON@): "
+
+  su -s /bin/sh flume -c '${FLUME_HOME}/bin/flume-daemon.sh start @FLUME_DAEMON@'
+  echo
+}
+
+stop() {
+  echo -n $"Stopping $desc (flume-@FLUME_DAEMON@): "
+  su -s /bin/sh  flume -c '${FLUME_HOME}/bin/flume-daemon.sh stop @FLUME_DAEMON@'
+  [ $? -eq 0 ] && rm -f $FLUME_PID
+  echo
+}
+
+restart() {
+  stop
+  echo "Sleeping for ${DOTIME}"
+  sleep ${DOTIME}
+  start
+}
+
+case "$1" in
+  start)
+    start
+    ;;
+  stop)
+    stop
+    ;;
+  status)
+    checkstatus
+    ;;
+  restart)
+    restart
+    ;;
+  *)
+    echo $"Usage: $0 {start|stop|restart}"
+    exit 1
+esac
+
+exit $RETVAL

Propchange: incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d.suse?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d.suse (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d.suse Tue Jul 19 19:44:48 2011
@@ -0,0 +1,127 @@
+#!/bin/bash
+#
+# (c) Copyright 2010, 2011 Cloudera, Inc.
+#
+#   Licensed 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 @FLUME_DAEMON@
+#
+# chkconfig: 345 90 10
+# description: Flume @FLUME_DAEMON@
+#
+### BEGIN INIT INFO
+# Provides:          flume-@FLUME_DAEMON@
+# Required-Start:    $syslog $remote_fs
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop:
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Flume @FLUME_DAEMON@
+### END INIT INFO
+
+source /lib/lsb/init-functions
+
+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
+FLUME_HOME=/usr/lib/flume
+EXEC_PATH=${FLUME_HOME}/bin/flume-daemon.sh
+DOTIME=3
+FLUME_RUN=/var/run/flume
+FLUME_PID=/var/run/flume/flume-flume-@FLUME_DAEMON@.pid
+LOCKFILE="/var/lock/subsys/hadoop-@HADOOP_DAEMON@"
+desc="Flume @FLUME_DAEMON@ daemon"
+install -d -m 0755 -o flume -g flume ${FLUME_RUN} 
+USER=flume
+
+
+start() {
+  [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  log_success_msg "Starting $desc (flume-@FLUME_DAEMON@): "
+  start_daemon -u $USER $EXEC_PATH start @FLUME_DAEMON@
+  RETVAL=$?
+  echo
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  log_success_msg "Stopping $desc (flume-@FLUME_DAEMON@): "
+  start_daemon -u $USER $EXEC_PATH stop @FLUME_DAEMON@
+  RETVAL=$?
+  sleep 5
+  echo
+  [ $RETVAL -eq 0 ] && rm -f $LOCKFILE $FLUME_PID
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  pidofproc -p $FLUME_PID java > /dev/null
+  status=$?
+
+  case "$status" in
+    $STATUS_RUNNING)
+      log_success_msg "@FLUME_DAEMON@ is running"
+      ;;
+    $STATUS_DEAD)
+      log_failure_msg "@FLUME_DAEMON@ is dead and pid file exists"
+      ;;
+    $STATUS_DEAD_AND_LOCK)
+      log_failure_msg "@FLUME_DAEMON@ is dead and lock file exists"
+      ;;
+    $STATUS_NOT_RUNNING)
+      log_failure_msg "@FLUME_DAEMON@ is not running"
+      ;;
+    *)
+      log_failure_msg "@FLUME_DAEMON@ status is unknown"
+      ;;
+  esac
+  return $status
+}
+
+condrestart(){
+  [ -e /var/lock/subsys/hadoop-@FLUME_DAEMON@ ] && 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}"
+    exit 1
+esac
+
+exit $RETVAL

Propchange: incubator/bigtop/trunk/src/pkg/rpm/flume/SOURCES/init.d.suse
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/rpm/flume/SPECS/flume.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/flume/SPECS/flume.spec?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/flume/SPECS/flume.spec (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/flume/SPECS/flume.spec Tue Jul 19 19:44:48 2011
@@ -0,0 +1,198 @@
+%define etc_flume /etc/flume/conf
+%define bin_flume %{_bindir}
+%define doc_flume %{_docdir}/flume-%{flume_version}
+%define man_flume %{_mandir}
+%define lib_flume /usr/lib/flume
+%define log_flume /var/log/flume
+%define flume_services master node
+
+%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 alternatives_cmd update-alternatives
+%global initd_dir %{_sysconfdir}/rc.d
+
+%else
+
+%define alternatives_cmd alternatives
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+
+%endif
+
+
+
+Name: flume
+Version: %{flume_version}
+Release: %{flume_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: https://github.com/cloudera/flume
+Group: Development/Libraries
+Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
+BuildArch: noarch
+License: APL2
+Source0: flume-%{flume_base_version}.tar.gz
+Source1: init.d
+Source2: init.d.suse
+Source3: install_flume.sh
+Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service, hadoop-zookeeper >= 3.3.1, hadoop >= 0.20.2
+BuildRequires: ant xml-commons xml-commons-apis
+
+# RHEL6 provides natively java
+%if 0%{?rhel} == 6
+BuildRequires: java-1.6.0-sun-devel
+Requires: java-1.6.0-sun
+%else
+BuildRequires: jdk >= 1.6
+Requires: jre >= 1.6
+%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 master
+Summary: The flume master daemon is the central administration and data path control point for flume nodes.
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/service, /sbin/chkconfig, %{name}
+
+# RHEL6 provides natively java
+%if 0%{?rhel} == 6
+Requires: java-1.6.0-sun
+%else
+Requires: jre >= 1.6
+%endif
+
+%if  %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%else
+# Required for init scripts
+Requires: redhat-lsb
+%endif
+
+
+%description master
+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}
+Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/service, /sbin/chkconfig, %{name}
+
+# RHEL6 provides natively java
+%if 0%{?rhel} == 6
+BuildRequires: java-1.6.0-sun-devel
+Requires: java-1.6.0-sun
+%else
+BuildRequires: jdk >= 1.6
+Requires: jre >= 1.6
+%endif
+
+%if  %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%else
+# 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 %{name}-%{flume_base_version}
+
+%build
+ant -f build.xml tar -Dversion=%{version}
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+sh $RPM_SOURCE_DIR/install_flume.sh \
+          --build-dir=. \
+          --prefix=$RPM_BUILD_ROOT \
+	  --doc-dir=%{doc_flume}
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
+
+
+%if  %{?suse_version:1}0
+orig_init_file=$RPM_SOURCE_DIR/init.d.suse
+%else
+orig_init_file=$RPM_SOURCE_DIR/init.d
+%endif
+
+for service in %{flume_services}
+do
+        init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
+        %__cp $orig_init_file $init_file
+        %__sed -i -e "s|@FLUME_DAEMON@|${service}|" $init_file
+        chmod 755 $init_file
+done
+
+%__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/lib/hadoop-*
+ln -s /usr/lib/hadoop/hadoop-core.jar $RPM_BUILD_ROOT/usr/lib/flume/lib/hadoop-core.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 flume 2> /dev/null || :
+%__install -d -o flume -g flume -m 0755 /var/run/flume
+%__install -d -o flume -g flume -m 0755 /var/log/flume
+
+# 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
+
+%files 
+%defattr(-,flume,flume)
+%config %{etc_flume}.empty
+%doc %{doc_flume}
+
+%attr(0755,root,root) %{bin_flume}
+%attr(0755,root,root) %{lib_flume}
+
+%define service_macro() \
+%files %1 \
+%attr(0755,root,root)/%{initd_dir}/%{name}-%1 \
+%attr(0755,root,root)%{lib_flume}/bin/flume-daemon.sh \
+%dir %{lib_flume}/bin \
+%dir %{lib_flume} \
+%post %1 \
+chkconfig --add %{name}-%1 \
+\
+%preun %1 \
+if [ "$1" = 0 ] ; then \
+        service %{name}-%1 stop > /dev/null \
+        chkconfig --del %{name}-%1 \
+fi
+%service_macro node
+%service_macro master

Added: incubator/bigtop/trunk/src/pkg/rpm/flume/SRPMS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/flume/SRPMS/.gitignore?rev=1148501&view=auto
==============================================================================
    (empty)

Added: incubator/bigtop/trunk/src/pkg/rpm/hadoop/RPMS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/hadoop/RPMS/.gitignore?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/hadoop/RPMS/.gitignore (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/hadoop/RPMS/.gitignore Tue Jul 19 19:44:48 2011
@@ -0,0 +1 @@
+repodata

Added: incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl Tue Jul 19 19:44:48 2011
@@ -0,0 +1,134 @@
+#!/bin/bash
+# 
+# (c) Copyright 2009 Cloudera, Inc.
+# 
+#   Licensed 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 Hadoop @HADOOP_DAEMON@
+# 
+# chkconfig: 2345 90 10
+# description: Hadoop @HADOOP_DAEMON@
+
+source /etc/rc.d/init.d/functions
+source /etc/default/hadoop
+
+RETVAL_SUCCESS=0
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+RETVAL=0
+PIDFILE="/var/run/hadoop/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid"
+LOCKFILE="/var/lock/subsys/hadoop-@HADOOP_DAEMON@"
+desc="Hadoop @HADOOP_DAEMON@ daemon"
+SLEEP_TIME=5
+
+start() {
+  echo -n $"Starting $desc (hadoop-@HADOOP_DAEMON@): "
+  daemon @HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config "@HADOOP_CONF_DIR@" start @HADOOP_DAEMON@ $DAEMON_FLAGS
+  RETVAL=$?
+
+  if [ "@HADOOP_DAEMON@" = "datanode" ]; then
+    # Some processes are slow to start
+    sleep $SLEEP_TIME
+    checkstatus
+    RETVAL=$?
+  fi
+
+  [ $RETVAL -eq $RETVAL_SUCCESS ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  echo -n $"Stopping $desc (hadoop-@HADOOP_DAEMON@): "
+  daemon @HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config "@HADOOP_CONF_DIR@" stop @HADOOP_DAEMON@
+  RETVAL=$?
+
+  [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE
+
+  if [ "@HADOOP_DAEMON@" = "datanode" ]; then
+    # Some processes are slow to stop
+    sleep $SLEEP_TIME
+    checkstatus
+
+    # Stopping a non running process should be a success
+    if [ $RETVAL -eq $STATUS_NOT_RUNNING ]; then
+        RETVAL=0
+    fi
+  fi
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  status -p $PIDFILE @HADOOP_DAEMON@
+  RETVAL=$?
+}
+
+condrestart(){
+  [ -e $LOCKFILE ] && restart || :
+}
+
+check_for_root() {
+  if [ $(id -ur) -ne 0 ]; then
+    echo 'Error: root user required'
+    echo
+     exit 1
+  fi
+}
+
+hadoopservice() {
+  case "$1" in
+    start)
+      check_for_root
+      start
+      ;;
+    stop)
+      check_for_root
+      stop
+      ;;
+    status)
+      checkstatus
+      ;;
+    restart)
+      check_for_root
+      restart
+      ;;
+    condrestart|try-restart)
+      check_for_root
+      condrestart
+      ;;
+    *)
+      if [ "@HADOOP_DAEMON@" = "namenode" ]; then
+        if [ "$1" = "upgrade" -o "$1" = "rollback" ]; then
+          DAEMON_FLAGS=-$1 $0 start
+          RETVAL=$?
+        else
+          echo $"Usage: $0 {start|stop|status|restart|try-restart|upgrade|rollback}"
+          exit 1
+        fi
+      else
+        echo $"Usage: $0 {start|stop|status|restart|try-restart}"
+        exit 1
+      fi
+  esac
+}
+
+hadoopservice "$1"
+
+exit $RETVAL

Added: incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse Tue Jul 19 19:44:48 2011
@@ -0,0 +1,181 @@
+#!/bin/bash
+#
+# (c) Copyright 2009, 2010, 2011 Cloudera, Inc.
+#
+#   Licensed 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 Hadoop @HADOOP_DAEMON@
+#
+# chkconfig: 345 90 10
+# description: Hadoop @HADOOP_DAEMON@
+#
+### BEGIN INIT INFO
+# Provides:          hadoop-@HADOOP_DAEMON@
+# Required-Start:    $syslog $remote_fs
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop:
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Hadoop @HADOOP_DAEMON@
+### END INIT INFO
+
+source /lib/lsb/init-functions
+source /etc/default/hadoop
+
+RETVAL_SUCCESS=0
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+
+ERROR_PROGRAM_NOT_INSTALLED=5
+ERROR_PROGRAM_NOT_CONFIGURED=6
+
+
+RETVAL=0
+EXEC_PATH=@HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh
+CONFIG_PATH="@HADOOP_CONF_DIR@"
+PIDFILE="/var/run/hadoop/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid"
+LOCKFILE="/var/lock/subsys/hadoop-@HADOOP_DAEMON@"
+desc="Hadoop @HADOOP_DAEMON@ daemon"
+USER="@HADOOP_DAEMON_USER@"
+SLEEP_TIME=5
+
+start() {
+  [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  [ -f $config ] || exit $ERROR_PROGRAM_NOT_CONFIGURED
+  log_success_msg "Starting $desc (hadoop-@HADOOP_DAEMON@): "
+  start_daemon -u $USER $EXEC_PATH --config "$CONFIG_PATH" start @HADOOP_DAEMON@ $DAEMON_FLAGS
+  RETVAL=$?
+
+  if [ "@HADOOP_DAEMON@" = "datanode" ]; then
+    # Some processes are slow to start
+    sleep $SLEEP_TIME
+    checkstatusofproc
+    RETVAL=$?
+  fi
+
+  [ $RETVAL -eq $RETVAL_SUCCESS ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  log_success_msg "Stopping $desc (hadoop-@HADOOP_DAEMON@): "
+  start_daemon -u $USER $EXEC_PATH --config "$CONFIG_PATH" stop @HADOOP_DAEMON@
+  RETVAL=$?
+
+  [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE
+
+  if [ "@HADOOP_DAEMON@" = "datanode" ]; then
+    # Some processes are slow to stop
+    sleep $SLEEP_TIME
+    checkstatusofproc
+    RETVAL=$?
+
+    # Stopping a non running process should be a success
+    if [ $RETVAL -eq $STATUS_NOT_RUNNING ]; then
+        RETVAL=0
+    fi
+  fi
+}
+
+restart() {
+  stop
+  start
+}
+
+
+checkstatusofproc(){
+  pidofproc -p $PIDFILE java > /dev/null
+}
+
+checkstatus(){
+  checkstatusofproc
+  status=$?
+
+  case "$status" in
+    $STATUS_RUNNING)
+      log_success_msg "@HADOOP_DAEMON@ is running"
+      ;;
+    $STATUS_DEAD)
+      log_failure_msg "@HADOOP_DAEMON@ is dead and pid file exists"
+      ;;
+    $STATUS_DEAD_AND_LOCK)
+      log_failure_msg "@HADOOP_DAEMON@ is dead and lock file exists"
+      ;;
+    $STATUS_NOT_RUNNING)
+      log_failure_msg "@HADOOP_DAEMON@ is not running"
+      ;;
+    *)
+      log_failure_msg "@HADOOP_DAEMON@ status is unknown"
+      ;;
+  esac
+  return $status
+}
+
+condrestart(){
+  [ -e $LOCKFILE ] && restart || :
+}
+
+check_for_root() {
+  if [ $(id -ur) -ne 0 ]; then
+    echo 'Error: root user required'
+    echo
+    exit 1
+  fi
+}
+
+hadoopservice() {
+  case "$1" in
+    start)
+      check_for_root
+      start
+      ;;
+    stop)
+      check_for_root
+      stop
+      ;;
+    status)
+      checkstatus
+      RETVAL=$?
+      ;;
+    restart)
+      check_for_root
+      restart
+      ;;
+    condrestart|try-restart)
+      check_for_root
+      condrestart
+      ;;
+    *)
+      if [ "@HADOOP_DAEMON@" = "namenode" ]; then
+        if [ "$1" = "upgrade" -o "$1" = "rollback" ]; then
+          DAEMON_FLAGS=-$1 $0 start
+          RETVAL=$?
+        else
+          echo $"Usage: $0 {start|stop|status|restart|try-restart|upgrade|rollback}"
+          exit 1
+        fi
+      else
+        echo $"Usage: $0 {start|stop|status|restart|try-restart}"
+        exit 1
+      fi
+  esac
+}
+
+hadoopservice "$1"
+
+exit $RETVAL

Added: incubator/bigtop/trunk/src/pkg/rpm/hadoop/SPECS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/rpm/hadoop/SPECS/.gitignore?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/rpm/hadoop/SPECS/.gitignore (added)
+++ incubator/bigtop/trunk/src/pkg/rpm/hadoop/SPECS/.gitignore Tue Jul 19 19:44:48 2011
@@ -0,0 +1,3 @@
+hadoop.spec
+pig.spec
+hive.spec



Mime
View raw message