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 [3/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
Propchange: incubator/bigtop/trunk/src/pkg/common/hive/hadoop-hive.sh.suse
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/hive/hive-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/hive/hive-site.xml?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/hive/hive-site.xml (added)
+++ incubator/bigtop/trunk/src/pkg/common/hive/hive-site.xml Tue Jul 19 19:44:48 2011
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
+<configuration>
+
+<!-- Hive Configuration can either be stored in this file or in the hadoop configuration files  -->
+<!-- that are implied by Hadoop setup variables.                                                -->
+<!-- Aside from Hadoop setup variables - this file is provided as a convenience so that Hive    -->
+<!-- users do not have to edit hadoop configuration files (that may be managed as a centralized -->
+<!-- resource).                                                                                 -->
+
+<!-- Hive Execution Parameters -->
+
+<property>
+  <name>javax.jdo.option.ConnectionURL</name>
+  <value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>
+  <description>JDBC connect string for a JDBC metastore</description>
+</property>
+
+<property>
+  <name>javax.jdo.option.ConnectionDriverName</name>
+  <value>org.apache.derby.jdbc.EmbeddedDriver</value>
+  <description>Driver class name for a JDBC metastore</description>
+</property>
+
+<property>
+  <name>hive.hwi.war.file</name>
+  <value>/usr/lib/hive/lib/hive-hwi-0.7.0-cdh3u1-SNAPSHOT.war</value>
+  <description>This is the WAR file with the jsp content for Hive Web Interface</description>
+</property>
+
+</configuration>

Added: incubator/bigtop/trunk/src/pkg/common/hive/hive.1
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/hive/hive.1?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/hive/hive.1 (added)
+++ incubator/bigtop/trunk/src/pkg/common/hive/hive.1 Tue Jul 19 19:44:48 2011
@@ -0,0 +1,88 @@
+.\" Process this file with
+.\" groff -man -Tascii hive.1
+.\"
+.TH hive 1 "October 2010 " Linux "User Manuals"
+
+.SH NAME
+Hive \- Data warehouse infrastructure built atop Hadoop.
+
+.SH SYNOPSIS
+
+.B hive
+[OPTIONS] --service \fISERVICE\fR [PARAMETERS]
+
+.SH DESCRIPTION
+
+Hive is a data warehouse system for Hadoop that facilitates easy data
+summarization, ad-hoc querying and analysis of large datasets stored
+in Hadoop compatible file systems. Hive provides a mechanism to put
+structure on this data and query the data using a SQL-like language
+called HiveQL. At the same time this language also allows traditional
+map/reduce programmers to plug in their custom mappers and reducers
+when it is inconvenient or inefficient to express this logic in
+HiveQL.
+
+Please note that Hadoop is a batch processing system and Hadoop jobs
+tend to have high latency and incur substantial overheads in job
+submission and scheduling. Consequently the average latency for Hive
+queries is generally very high (minutes) even when data sets involved
+are very small (say a few hundred megabytes). As a result it cannot be
+compared with systems such as Oracle where analyses are conducted on a
+significantly smaller amount of data but the analyses proceed much
+more iteratively with the response times between iterations being less
+than a few minutes. Hive aims to provide acceptable (but not optimal)
+latency for interactive data browsing, queries over small data sets or
+test queries.
+
+Hive is not designed for online transaction processing and does not
+support real-time queries or row level insert/updates. It is best used
+for batch jobs over large sets of immutable data (like web logs). What
+Hive values most are scalability (scale out with more machines added
+dynamically to the Hadoop cluster), extensibility (with MapReduce
+framework and UDF/UDAF/UDTF), fault-tolerance, and loose-coupling with
+its input formats.
+
+For more information about Hive, see http://hive.apache.org.
+
+\fISERVICE\fR may be one of the following:
+  cli           The Hive shell, the default service
+  hiveserver    Start the Hive server
+  hwi           Hive web interface
+  jar           Run a jar that uses Hadoop and Hive APIs
+  lineage       Output lineage info for a query
+  metastore     Start the Hive metastore
+
+To list available parameters for a service:
+.B hive
+--service \fISERVICE\fR --help
+
+.SH OPTIONS
+
+.IP "--auxpath"
+Auxillary jars
+
+.IP "--config"
+Hive configuration directory
+
+.IP "--service"
+Starts specific service/component. cli is default
+
+.IP "-hiveconf <x>=<y>"
+Sets Hive configuration property "x" equal to "y".
+
+.SH ENVIRONMENT
+
+.IP HIVE_OPT
+Extra Java runtime options.
+
+.IP HADOOP_HOME
+Optionally, the Hadoop home to run with.
+
+.IP HIVE_AUX_JARS_PATH
+Auxillary JARs, overridden by --auxpath command line argument.
+
+.IP HIVE_CONF_DIR
+Alternate location for Hive configuration directory.
+
+.SH COPYRIGHT
+Copyright (C) 2010 The Apache Software Foundation. All rights reserved.

Added: incubator/bigtop/trunk/src/pkg/common/hive/install_hive.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/hive/install_hive.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/hive/install_hive.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/hive/install_hive.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Copyright 2009 Cloudera, inc.
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to hive/build/dist
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/hive]
+     --lib-dir=DIR               path to install hive home [/usr/lib/hive]
+     --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 'lib-dir:' \
+  -l 'installed-lib-dir:' \
+  -l 'bin-dir:' \
+  -l 'examples-dir:' \
+  -l 'python-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
+        ;;
+        --lib-dir)
+        LIB_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
+        ;;
+        --python-dir)
+        PYTHON_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=$PREFIX/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/hive}
+LIB_DIR=${LIB_DIR:-$PREFIX/usr/lib/hive}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/hive}
+EXAMPLES_DIR=${EXAMPLES_DIR:-$DOC_DIR/examples}
+BIN_DIR=${BIN_DIR:-$PREFIX/usr/bin}
+PYTHON_DIR=${PYTHON_DIR:-$LIB_DIR/lib/py}
+CONF_DIR=/etc/hive
+CONF_DIST_DIR=/etc/hive/conf.dist
+
+# First we'll move everything into lib
+install -d -m 0755 ${LIB_DIR}
+(cd ${BUILD_DIR} && tar -cf - .)|(cd ${LIB_DIR} && tar -xf -)
+
+for thing in conf README.txt examples lib/py;
+do
+  rm -rf ${LIB_DIR}/$thing
+done
+
+install -d -m 0755 ${BIN_DIR}
+for file in hive
+do
+  wrapper=$BIN_DIR/$file
+  cat >>$wrapper <<EOF
+#!/bin/sh
+
+export HADOOP_HOME=\${HADOOP_HOME:-/usr/lib/hadoop}
+export HIVE_HOME=$INSTALLED_LIB_DIR
+exec $INSTALLED_LIB_DIR/bin/$file "\$@"
+EOF
+  chmod 755 $wrapper
+done
+
+# Config
+install -d -m 0755 ${PREFIX}${CONF_DIST_DIR}
+(cd ${BUILD_DIR}/conf && tar -cf - .)|(cd ${PREFIX}${CONF_DIST_DIR} && tar -xf -)
+cp hive-site.xml ${PREFIX}${CONF_DIST_DIR}
+
+ln -s ${CONF_DIR}/conf $LIB_DIR/conf
+
+install -d -m 0755 $MAN_DIR
+gzip -c hive.1 > $MAN_DIR/hive.1.gz
+
+# Docs
+install -d -m 0755 ${DOC_DIR}
+cp ${BUILD_DIR}/README.txt ${DOC_DIR}
+
+# Examples
+install -d -m 0755 ${EXAMPLES_DIR}
+cp -a ${BUILD_DIR}/examples/* ${EXAMPLES_DIR}
+
+# Python libs
+install -d -m 0755 ${PYTHON_DIR}
+(cd $BUILD_DIR/lib/py && tar cf - .) | (cd ${PYTHON_DIR} && tar xf -)
+chmod 755 ${PYTHON_DIR}/hive_metastore/*-remote
+
+# Dir for Metastore DB
+install -d -m 1777 $PREFIX/var/lib/hive/metastore/
+
+# We need to get rid of jars that happen to be shipped in other CDH packages
+rm -f ${LIB_DIR}/lib/hbase-*.jar ${LIB_DIR}/lib/zookeeper-*.jar

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

Added: incubator/bigtop/trunk/src/pkg/common/oozie/create-package-layout
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/create-package-layout?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/create-package-layout (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/create-package-layout Tue Jul 19 19:44:48 2011
@@ -0,0 +1,236 @@
+#!/bin/sh
+#
+#  Licensed to Cloudera, Inc. under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for
+#  additional information regarding copyright ownership.  Cloudera,
+#  Inc. 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.
+
+#
+# Copyright (c) 2010-2011 Cloudera, inc.
+#
+
+failIfNotOK() {
+  if [ $? != 0 ]; then
+    exit $?
+  fi
+}
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --extra-dir=DIR    path to cloudera distribution files
+     --build-dir=DIR    path to cloudera distribution files
+     --server-dir=DIR   path to server package root
+     --client-dir=DIR   path to the client package root
+     --initd-dir=DIR    path to the server init.d directory
+
+  Optional options:
+     --docs-dir=DIR     path to the documentation root
+  "
+  exit 1
+}
+
+OPTS=$(getopt \
+  -n $0 \
+  -o '' \
+  -l 'extra-dir:' \
+  -l 'build-dir:' \
+  -l 'server-dir:' \
+  -l 'client-dir:' \
+  -l 'docs-dir:' \
+  -l 'initd-dir:' \
+  -- "$@")
+
+if [ $? != 0 ] ; then
+    usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+    case "$1" in
+        --extra-dir)
+        EXTRADIR=$2 ; shift 2
+        ;;
+        --build-dir)
+        BUILDDIR=$2 ; shift 2
+        ;;
+        --server-dir)
+        SERVERDIR=$2 ; shift 2
+        ;;
+        --client-dir)
+        CLIENTDIR=$2 ; shift 2
+        ;;
+        --docs-dir)
+        OOZIE_DOCS=$2 ; shift 2
+        ;;
+        --initd-dir)
+        INITDDIR=$2 ; shift 2
+        ;;
+        --)
+        shift; break
+        ;;
+        *)
+        echo "Unknown option: $1"
+        usage
+        ;;
+    esac
+done
+
+for var in BUILDDIR SERVERDIR CLIENTDIR; do
+  if [ -z "$(eval "echo \$$var")" ]; then
+    echo Missing param: $var
+    usage
+  fi
+done
+
+if [ ! -d "${BUILDDIR}" ]; then
+  echo "Build directory does not exist: ${BUILDDIR}"
+  exit 1
+fi
+
+if [ -d "${SERVERDIR}" ]; then
+  echo "Server directory already exists, delete first: ${SERVERDIR}"
+  exit 1
+fi
+
+if [ -d "${CLIENTDIR}" ]; then
+  echo "Client directory already exists, delete first: ${CLIENTDIR}"
+  exit 1
+fi
+
+if [ -d "${OOZIE_DOCS}" ]; then
+  echo "Docs directory already exists, delete first: ${OOZIE_DOCS}"
+  exit 1
+fi
+
+OOZIE_BUILD_DIR=${BUILDDIR}
+
+## Install client image first
+OOZIE_CLIENT_DIR=${CLIENTDIR}/usr/lib/oozie
+OOZIE_MAN_DIR=${CLIENTDIR}/usr/share/man/man1
+DOC_DIR=${OOZIE_DOCS:-$PREFIX/usr/share/doc/oozie}
+BIN_DIR=${CLIENTDIR}/usr/bin
+
+install -d -m 0755 ${OOZIE_CLIENT_DIR}
+failIfNotOK
+install -d -m 0755 ${OOZIE_CLIENT_DIR}/bin
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/bin/oozie ${OOZIE_CLIENT_DIR}/bin
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/lib ${OOZIE_CLIENT_DIR}
+failIfNotOK
+install -d -m 0755 ${DOC_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/LICENSE.txt ${DOC_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/NOTICE.txt ${DOC_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/oozie-examples.tar.gz ${DOC_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/readme.txt ${DOC_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/release-log.txt ${DOC_DIR}
+failIfNotOK
+[ -f ${OOZIE_BUILD_DIR}/PATCH.txt ] && cp ${OOZIE_BUILD_DIR}/PATCH.txt ${DOC_DIR}
+# failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/docs/* ${DOC_DIR}
+failIfNotOK
+install -d -m 0755 ${OOZIE_MAN_DIR}
+failIfNotOK
+gzip -c ${EXTRADIR}/oozie.1 > ${OOZIE_MAN_DIR}/oozie.1.gz
+failIfNotOK
+cp -R ${EXTRADIR}/oozie-examples.sh ${OOZIE_CLIENT_DIR}/bin
+failIfNotOK
+
+# Create the /usr/bin/oozie wrapper
+install -d -m 0755 $BIN_DIR
+failIfNotOK
+cat > ${BIN_DIR}/oozie <<EOF
+#!/bin/sh
+#
+#  Licensed to Cloudera, Inc. under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for
+#  additional information regarding copyright ownership.  Cloudera,
+#  Inc. 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.
+
+#
+# Copyright (c) 2010-2011 Cloudera, inc.
+#
+
+exec /usr/lib/oozie/bin/oozie "\$@"
+EOF
+failIfNotOK
+chmod 755 ${BIN_DIR}/oozie
+failIfNotOK
+
+
+## Install server image
+OOZIE_SERVER_DIR=${SERVERDIR}/usr/lib/oozie
+OOZIE_CONF=${SERVERDIR}/etc/oozie
+OOZIE_INITD=${INITDDIR}
+OOZIE_DATA=${SERVERDIR}/var/lib/oozie
+
+install -d -m 0755 ${OOZIE_SERVER_DIR}
+failIfNotOK
+install -d -m 0755 ${OOZIE_SERVER_DIR}/bin
+failIfNotOK
+install -d -m 0755 ${OOZIE_DATA}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/bin/*.sh ${OOZIE_SERVER_DIR}/bin
+
+# We need to find a better way of doing this
+# for DEB dirs are different so we have to delete the examples from the server
+# for RPM dirs are the same and RPM SPEC selectively picks the scripts to add
+if [ "${OOZIE_CLIENT_DIR}" != "${OOZIE_SERVER_DIR}" ]; then
+  rm ${OOZIE_SERVER_DIR}/bin/oozie-examples.sh
+fi
+
+failIfNotOK
+install -d -m 0755 ${OOZIE_CONF}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/conf/* ${OOZIE_CONF}
+failIfNotOK
+if [ "${OOZIE_INITD}" != "" ]; then
+  install -d -m 0755 ${OOZIE_INITD}
+  failIfNotOK
+  cp -R ${EXTRADIR}/oozie.init ${OOZIE_INITD}/oozie
+  failIfNotOK
+fi
+cp -R ${OOZIE_BUILD_DIR}/oozie-sharelib*.tar.gz ${OOZIE_SERVER_DIR}/oozie-sharelib.tar.gz
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/oozie.war ${OOZIE_SERVER_DIR}
+failIfNotOK
+cp -R ${OOZIE_BUILD_DIR}/oozie-server ${OOZIE_SERVER_DIR}
+failIfNotOK
+install -d -m 0755 ${OOZIE_DATA}/oozie-server
+failIfNotOK
+mv ${OOZIE_SERVER_DIR}/oozie-server/conf ${OOZIE_DATA}/oozie-server/
+failIfNotOK
+mv ${OOZIE_SERVER_DIR}/oozie-server/webapps ${OOZIE_DATA}/oozie-server/
+failIfNotOK
+cp -R ${EXTRADIR}/oozie-env.sh ${OOZIE_SERVER_DIR}/bin
+failIfNotOK
+chmod 755 ${OOZIE_SERVER_DIR}/bin/oozie-env.sh
+failIfNotOK
+

Added: incubator/bigtop/trunk/src/pkg/common/oozie/do-release-build
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/do-release-build?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/do-release-build (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/do-release-build Tue Jul 19 19:44:48 2011
@@ -0,0 +1,182 @@
+#!/usr/bin/env bash
+#
+#  Licensed to Cloudera, Inc. under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for
+#  additional information regarding copyright ownership.  Cloudera,
+#  Inc. 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.
+
+#
+# Copyright (c) 2010 Cloudera, inc.
+#
+
+#
+# Resolve source directory
+#
+
+# $0 may be a softlink
+PRG="${0}"
+while [ -h "${PRG}" ]; do
+  ls=`ls -ld "${PRG}"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "${PRG}"`/"$link"
+  fi
+done
+
+RELEASE_DIR=`dirname ${PRG}`
+RELEASE_DIR=`cd ${RELEASE_DIR}/..;pwd`
+
+#
+# Resolve build version
+#
+OOZIE_VERSION=2.3.0
+RELEASE_ENV_FILENAME=release.env
+RELEASE_ENV_FILE=${RELEASE_DIR}/cloudera/${RELEASE_ENV_FILENAME}
+if [ -f "${RELEASE_ENV_FILE}" ]; then
+  echo "Setting release environment using ${RELEASE_ENV_FILE}"
+  . ${RELEASE_ENV_FILE}
+fi
+
+# IMPORTANT: THE FULL_VERSION, if set, will be used only for the final TARBALL,
+#            Everything inside of the TARBALL uses the version specified in the POM
+if [ -z "${FULL_VERSION}" ]; then
+  FULL_VERSION=${OOZIE_VERSION}
+  echo "Warning: FULL_VERSION not specified. Default version [${FULL_VERSION}] will be used."
+fi
+VERSION_SUFFIX="-${FULL_VERSION}"
+
+#
+# Build Oozie
+#
+
+echo "Starting system build"
+
+# Test if there is a + sign in the dir path
+# We need to do this because in Linux Sun JVM inteprets '+' as ' ' in URLs
+# testcases uses URLs to access testcases directories and OpenJPA enhancer uses them as well
+WORKDIR=${RELEASE_DIR}
+if [[ "${WORKDIR}" == *\+* ]]; then
+  # There is a + sign. Create a temp work dir
+  # and copy over the files to that place
+  WORKDIR=`mktemp -d /tmp/oozie.XXXXXX`
+  echo "Created temporary workspace directory: ${WORKDIR}"
+  cp -R ${RELEASE_DIR}/* ${WORKDIR}
+fi
+
+# Delete and recreate build directory
+BUILDDIR=${WORKDIR}/build
+rm -rf ${BUILDDIR}
+mkdir -p ${BUILDDIR}
+
+EXTRA_GOALS=""
+
+# Check if maven deploy should be done or not
+if [ "${DO_MAVEN_DEPLOY}" = "deploy" ]; then
+  EXTRA_GOALS="${EXTRA_GOALS} source:jar deploy"
+fi
+
+# Invoke Oozie build script with CDH options
+${WORKDIR}/bin/mkdistro.sh -DincludeHadoopJars -DskipTests -Dnot.cdh.release.build=false ${EXTRA_GOALS} "$@"
+MKDISTRO_RESULT=$?
+if [ "${MKDISTRO_RESULT}" != "0" ]; then
+  echo "ERROR: mkdistro.sh failed with error ${MKDISTRO_RESULT}"
+  echo "Build files from failed build: ${WORKDIR}"
+  exit ${MKDISTRO_RESULT}
+fi
+
+#
+# Expand Oozie TAR and create CDH Ooozie TAR
+#
+# (TODO: This logic is kind of twisted, revisit.)
+# (TODO: Consider doing the source copy before the build if we can assume a clean checkout.)
+#
+
+EXPTMPDIR=${BUILDDIR}/temp
+mkdir -p ${EXPTMPDIR}
+URLSAFE_VERSION_SUFFIX=`echo ${VERSION_SUFFIX}| sed -e "s/+/-/"`
+ORIGINAL_NAME=oozie${VERSION_SUFFIX}
+URLSAFE_NAME=oozie${URLSAFE_VERSION_SUFFIX}
+EXPDIR=${EXPTMPDIR}/${URLSAFE_NAME}
+(
+cd ${EXPTMPDIR}
+tar zxf ${WORKDIR}/distro/target/oozie-*.tar.gz
+if [ "${FULL_VERSION}" != "${OOZIE_VERSION}" ]; then
+  mv ${EXPTMPDIR}/oozie-* ${EXPDIR}
+fi
+
+cd ${EXPDIR}
+rm -rf ${EXPDIR}/oozie-client-*.tar.gz
+
+# creating the examples installer script for TAR distros, if doing DEB/RPM the script
+# is overriden in the create-package-layout directory
+cp ${RELEASE_DIR}/cloudera/oozie-examples.sh ${EXPDIR}/bin/
+
+SRCDIR=${EXPDIR}/src
+mkdir -p ${SRCDIR}
+for srcfile in ${WORKDIR}/*
+do
+  if [ "${srcfile}" != "${BUILDDIR}" ]; then
+    cp -R ${srcfile} ${SRCDIR}
+  fi
+done
+rm -rf ${SRCDIR}/target \
+       ${SRCDIR}/*/target \
+       ${SRCDIR}/core/build \
+       ${SRCDIR}/core/pig*.log \
+       ${SRCDIR}/core/pig*.properties \
+       ${SRCDIR}/examples/mem \
+       ${SRCDIR}/examples/oozietests \
+       ${SRCDIR}/mkdistro-*.out \
+       ${SRCDIR}/*.iml \
+       ${SRCDIR}/*/*.iml \
+       ${SRCDIR}/*.ipr \
+       ${SRCDIR}/*.iws 
+
+cat > ${SRCDIR}/cloudera/${RELEASE_ENV_FILENAME} <<EOM
+FULL_VERSION=${FULL_VERSION}
+export FULL_VERSION
+EOM
+cp ${SRCDIR}/LICENSE.txt ${EXPDIR}
+cp ${SRCDIR}/NOTICE.txt ${EXPDIR}
+cd ${EXPDIR}
+jar xf ${EXPDIR}/docs.zip
+rm -rf ${EXPDIR}/docs.zip
+rm -rf ${EXPDIR}/WEB-INF
+rm -rf ${EXPDIR}/META-INF
+cd ${EXPTMPDIR}
+if [ "${URLSAFE_NAME}" != "${ORIGINAL_NAME}" ]; then
+  mv ${URLSAFE_NAME} ${ORIGINAL_NAME}
+fi
+tar cfz oozie${VERSION_SUFFIX}.tar.gz ${ORIGINAL_NAME}
+mv oozie${VERSION_SUFFIX}.tar.gz ${BUILDDIR}
+cd ${BUILDDIR}
+rm -rf ${EXPTMPDIR}
+)
+
+# If a temp work dir was created, move the files back to
+# basedir and clean it up.
+
+if [ "${WORKDIR}" != "${RELEASE_DIR}" ]; then
+  echo "Moving built files from temporary location to work dir"
+  mv ${WORKDIR}/build ${RELEASE_DIR}/build
+  rm -rf ${WORKDIR}
+fi
+
+echo "Build available at: ${RELEASE_DIR}/build"
+
+(cd ${RELEASE_DIR} ; tar --strip-components 1 -xzvf build/oozie${VERSION_SUFFIX}.tar.gz; rm -f bin/mkdistro.sh)
+
+echo "SUCCESS: Build complete"
+exit 0

Propchange: incubator/bigtop/trunk/src/pkg/common/oozie/do-release-build
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/oozie/oozie-env.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/oozie-env.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/oozie-env.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/oozie-env.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,23 @@
+#! /bin/bash
+#
+# Copyright (c) 2010 Yahoo! Inc. All rights reserved. 
+# 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. See accompanying LICENSE file.
+#
+
+export OOZIE_CONFIG=/etc/oozie
+export OOZIE_DATA=/var/lib/oozie
+export OOZIE_LOG=/var/log/oozie
+export CATALINA_BASE=${OOZIE_DATA}/oozie-server
+export CATALINA_TMPDIR=/var/tmp/oozie
+export CATALINA_PID=/var/run/oozie/oozie.pid
+

Propchange: incubator/bigtop/trunk/src/pkg/common/oozie/oozie-env.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/oozie/oozie-examples.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/oozie-examples.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/oozie-examples.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/oozie-examples.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+#  Licensed to Cloudera, Inc. under one or more contributor license
+#  agreements.  See the NOTICE file distributed with this work for
+#  additional information regarding copyright ownership.  Cloudera,
+#  Inc. 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.
+
+#
+# Copyright (c) 2011 Cloudera, inc.
+#
+
+#
+# Resolve Oozie install directory
+#
+
+# $0 may be a softlink
+PRG="${0}"
+while [ -h "${PRG}" ]; do
+  ls=`ls -ld "${PRG}"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "${PRG}"`/"$link"
+  fi
+done
+
+OOZIE_DIR=`dirname ${PRG}`
+OOZIE_DIR=`cd ${OOZIE_DIR}/..;pwd`
+
+
+failIfNotOK() {
+  if [ $? != 0 ]; then
+    echo $1
+    if [ -f "${WORKDIR}" ]; then
+      rm -rf ${WORKDIR}
+    fi
+    exit $?
+  fi
+}
+
+remove_examples() {
+  hadoop fs -rmr examples
+  failIfNotOK "Deletion of examples from HDFS failed"
+}
+
+install_examples() {
+  EXAMPLESTARFILE="${OOZIE_DIR}/oozie-examples.tar.gz"
+  if [ ! -f "${EXAMPLESTARFILE}" ]; then
+    EXAMPLESTARFILE="/usr/share/doc/oozie/oozie-examples.tar.gz"
+  fi
+  if [ ! -f "${EXAMPLESTARFILE}" ]; then
+    EXAMPLESTARFILE="/usr/share/doc/packages/oozie/oozie-examples.tar.gz"
+  fi
+  if [ ! -f "${EXAMPLESTARFILE}" ]; then
+    echo "Could not find Oozie examples tarball"
+    exit 1
+  fi
+
+  WORKDIR=`mktemp -d /tmp/oozie.XXXXXX`
+  failIfNotOK "Could not create temp dir"
+  cd ${WORKDIR}
+  tar xzf ${EXAMPLESTARFILE}
+  failIfNotOK "Could not expand examples"
+  hadoop fs -put examples examples
+  failIfNotOK "Could not copy examples to HDFS"
+  rm -rf ${WORKDIR}
+}
+
+if [ "${1}" = "-install" ]; then
+  hadoop fs -test -e examples
+  if [ $? = 0 ]; then
+    remove_examples
+  fi
+  install_examples
+elif [ "${1}" = "-remove" ]; then
+  remove_examples
+else
+  echo "Usage: -install|-remove"
+  exit 1
+fi

Propchange: incubator/bigtop/trunk/src/pkg/common/oozie/oozie-examples.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/oozie/oozie.1
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/oozie.1?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/oozie.1 (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/oozie.1 Tue Jul 19 19:44:48 2011
@@ -0,0 +1,168 @@
+.\" Process this file with
+.\" groff -man -Tascii oozie.1
+.\"
+.TH oozie 1 "February 2011 " Linux "User Manuals"
+
+.SH NAME
+Oozie \- Oozie is the workflow/coordinator engine for Hadoop.
+
+.SH SYNOPSIS
+
+.B oozie
+subcommand [options]
+
+.SH DESCRIPTION
+
+Oozie is a workflow/coordination service to manage data processing
+jobs for Hadoop. It is an extensible, scalable and data-aware service
+to orchestrate dependencies between jobs running on Hadoop (including
+HDFS, Pig,  MapReduce, Streaming, Pipes).
+
+
+Oozie Client Authentication:
+
+The Cloudera distribution of Oozie 2.3.0 supports Kerberos authentication.
+If the Oozie server is configured with Kerberos authentication for Oozie
+users, the oozie client command will use the Kerberos credentials available
+in the OS Kerberos cache (normally initialized with the kinit commmand).
+
+
+For more information about Oozie, see 
+
+   http://archive.cloudera.com/cdh/3/oozie/
+
+.SH SUBCOMMANDS
+
+.IP "help"
+display usage
+
+.IP "version"
+show client version
+
+.IP "job <OPTIONS>"
+ job operations
+
+OPTIONS:
+
+-action <arg> : coordinator rerun on action ids (requires -rerun)
+
+-change <arg> : change a coordinator job
+
+-config <arg> : job configuration file '.xml' or '.properties'
+
+-D <property=value> : set/override value for given property
+
+-date <arg> : coordinator rerun on action dates (requires -rerun)
+
+-definition <arg> : job definition
+
+-dryrun : Supported in Oozie-2.0 or later versions ONLY - dryrun or
+test run a coordinator job (requires -config) - job is not queued
+
+-info <arg> : info of a job
+
+-kill <arg> : kill a job
+
+-len <arg> : number of actions (default TOTAL ACTIONS, requires -info)
+
+-localtime : use local time (default GMT)
+
+-log <arg> : job log
+
+-nocleanup : do not clean up output-events of the coordiantor rerun
+actions (requires -rerun)
+
+-offset <arg> : job info offset of actions (default '1', requires -info)
+
+-oozie <arg> : Oozie URL
+
+-refresh : re-materialize the coordinator rerun actions (requires -rerun)
+
+-rerun <arg> : rerun a job (workflow requires -config, coordinator
+requires -action or -date)
+
+-resume <arg> : resume a job
+
+-run : run a job (requires -config)
+
+-start <arg> : start a job
+
+-submit : submit a job (requires -config)
+
+-suspend <arg> : suspend a job
+
+-value <arg> : new endtime/concurrency/pausetime value for changing a
+coordinator job
+
+-verbose : verbose mode
+
+.IP "jobs <OPTIONS>"
+jobs status
+
+OPTIONS:
+
+-filter <arg> : user=<U>;name=<N>;group=<G>;status=<S>;...
+
+-jobtype <arg> : job type ('Supported in Oozie-2.0 or later versions
+ONLY - coordinator' or 'wf' (default))
+
+-len <arg> : number of jobs (default '100')
+
+-localtime : use local time (default GMT)
+
+-offset <arg> : jobs offset (default '1')
+
+-oozie <arg> : Oozie URL
+
+-verbose : verbose mode
+
+.IP "admin <OPTIONS>"
+admin operations
+
+-oozie <arg> : Oozie URL
+
+-queuedump : show Oozie server queue elements
+
+-status : show the current system status
+
+-systemmode <arg> : Supported in Oozie-2.0 or later versions ONLY.
+Changes oozie system mode [NORMAL|NOWEBSERVICE|SAFEMODE]
+
+-version : show Oozie server build version
+
+.IP "validate <ARGS>"
+validate a workflow XML file
+
+.IP "sla <OPTIONS>"
+sla operations (Supported in Oozie-2.0 or later)
+
+OPTIONS:
+
+-len <arg> : number of results (default '100')
+
+-offset <arg> : start offset (default '0')
+
+-oozie <arg> : Oozie URL
+
+.IP "pig <OPTIONS> -X <ARGS>"
+submit a pig job
+
+everything after '-X' are pass-through parameters to pig
+
+OPTIONS:
+
+-config <arg> : job configuration file '.properties'
+
+-D <property=value> : set/override value for given property
+
+-file <arg> : Pig script
+
+-oozie <arg> : Oozie URL
+
+.SH ENVIRONMENT
+
+.IP OOZIE_URL
+if set, it is used as the default value for the '-oozie' option.
+
+.SH COPYRIGHT
+Copyright (C) 2010 Yahoo! Inc. All rights reserved.

Added: incubator/bigtop/trunk/src/pkg/common/oozie/oozie.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/oozie/oozie.init?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/oozie/oozie.init (added)
+++ incubator/bigtop/trunk/src/pkg/common/oozie/oozie.init Tue Jul 19 19:44:48 2011
@@ -0,0 +1,124 @@
+#! /bin/sh
+#
+# 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. See accompanying LICENSE file.
+#
+#
+# Starts Oozie Server
+#
+# chkconfig: 345 90 10
+# description: Oozie Server
+#
+### BEGIN INIT INFO
+# Provides:          oozie
+# 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: Oozie server daemon
+### END INIT INFO
+
+is_oozie_alive() {
+  if [ ! -f "$OOZIE_PID" ]; then
+    #not running
+    STATUS=3
+  elif read pid < "$OOZIE_PID" && ps -p "$pid" > /dev/null 2>&1; then
+    #running
+    STATUS=0
+  else
+    #pid file but not running
+    STATUS=1
+  fi
+}
+
+start_oozie() {
+  install -d -o oozie -g oozie /var/run/oozie
+  install -d -o oozie -g oozie /var/log/oozie
+  install -d -o oozie -g oozie /var/tmp/oozie
+  su --shell=/bin/sh -l oozie -c /usr/lib/oozie/bin/oozie-start.sh
+}
+
+stop_oozie() {
+  is_oozie_alive
+  if [ "${STATUS}" = "0" ]; then
+    su --shell=/bin/sh -l oozie -c /usr/lib/oozie/bin/oozie-stop.sh
+    if [ $? -eq 0 ]; then
+      is_oozie_alive
+      if [ "${STATUS}" = "1" ]; then
+        rm ${OOZIE_PID}
+      elif [ "${STATUS}" = "0" ]; then
+        read pid < "$OOZIE_PID" && ps -p "$pid" > /dev/null 2>&1
+        kill -9 ${pid}
+        rm ${OOZIE_PID}
+      fi
+    fi
+  elif [ "${STATUS}" = "1" ]; then
+    rm ${OOZIE_PID}
+  fi
+}
+
+. /usr/lib/oozie/bin/oozie-env.sh
+
+OOZIE_PID=${CATALINA_PID}
+
+case "$1" in
+  start)
+        is_oozie_alive
+        if [ "${STATUS}" = "0" ]; then
+          echo "already running"
+          exit 1
+        fi
+        if [ "${STATUS}" = "1" ]; then
+          rm ${OOZIE_PID}
+        fi
+        start_oozie
+        exit 0
+        ;;
+  restart|reload|force-reload)
+        stop_oozie
+        start_oozie
+        exit 0
+        ;;
+  stop)
+        stop_oozie
+        exit 0
+        ;;
+  status)
+        is_oozie_alive
+        case ${STATUS} in
+          3)
+            echo "not running."
+            exit ${STATUS}
+            ;;
+          1)
+            echo "not running but $CATALINA_PID exists."
+            exit ${STATUS}
+            ;;
+          0)
+            echo "running"
+            exit ${STATUS}
+            ;;
+          *)
+            echo "unexpected error"
+            exit 5
+            ;;
+        esac 
+        ;;
+  *)
+        echo "Usage: $0 start|stop|status|restart|reload|force-reload" >&2
+        exit 3
+        ;;
+esac
+exit 6
+

Propchange: incubator/bigtop/trunk/src/pkg/common/oozie/oozie.init
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/pig/install_pig.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/pig/install_pig.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/pig/install_pig.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/pig/install_pig.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,130 @@
+#!/bin/sh
+# Copyright 2009 Cloudera, inc.
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to pig dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/pig]
+     --lib-dir=DIR               path to install pig home [/usr/lib/pig]
+     --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 'lib-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
+        ;;
+        --lib-dir)
+        LIB_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=$PREFIX/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/pig}
+LIB_DIR=${LIB_DIR:-$PREFIX/usr/lib/pig}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/pig}
+EXAMPLES_DIR=${EXAMPLES_DIR:-$DOC_DIR/examples}
+BIN_DIR=${BIN_DIR:-$PREFIX/usr/bin}
+CONF_DIR=/etc/pig
+CONF_DIST_DIR=/etc/pig/conf.dist
+
+# First we'll move everything into lib
+install -d -m 0755 $LIB_DIR
+(cd $BUILD_DIR && tar -cf - .) | (cd $LIB_DIR && tar -xf -)
+
+# Remove directories that are going elsewhere
+for dir in conf src lib-src docs tutorial test build.xml
+do
+   rm -rf $LIB_DIR/$dir
+done
+
+# Copy in the configuration files
+install -d -m 0755 $PREFIX/$CONF_DIST_DIR
+cp *.properties $PREFIX/$CONF_DIST_DIR
+ln -s /etc/pig/conf $LIB_DIR/conf
+
+# Copy in the /usr/bin/pig wrapper
+install -d -m 0755 $BIN_DIR
+cat > $BIN_DIR/pig <<EOF
+#!/bin/sh
+
+exec $INSTALLED_LIB_DIR/bin/pig "\$@"
+EOF
+chmod 755 $BIN_DIR/pig
+
+install -d -m 0755 $MAN_DIR
+gzip -c pig.1 > $MAN_DIR/pig.1.gz
+
+# Copy in the docs
+install -d -m 0755 $DOC_DIR
+(cd $BUILD_DIR/docs && tar -cf - .)|(cd $DOC_DIR && tar -xf -)
+
+install -d -m 0755 $EXAMPLES_DIR
+PIG_JAR=$(basename $(ls $LIB_DIR/pig*core.jar))
+sed -i -e "s|../pig.jar|/usr/lib/pig/$PIG_JAR|" $BUILD_DIR/tutorial/build.xml
+(cd $BUILD_DIR/tutorial && tar -cf - .)|(cd $EXAMPLES_DIR && tar -xf -)
+
+# It's somewhat silly that the hadoop jars are included in the pig lib
+# dir, since we depend on hadoop in our packages. We can rm them
+rm -f $LIB_DIR/lib/hadoop*jar
+
+# Pig log directory
+install -d -m 1777 $PREFIX/var/log/pig

Added: incubator/bigtop/trunk/src/pkg/common/pig/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/pig/log4j.properties?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/pig/log4j.properties (added)
+++ incubator/bigtop/trunk/src/pkg/common/pig/log4j.properties Tue Jul 19 19:44:48 2011
@@ -0,0 +1,8 @@
+# ***** Set root logger level to DEBUG and its only appender to A.
+log4j.logger.org.apache.pig=info, A
+
+# ***** A is set to be a ConsoleAppender.
+log4j.appender.A=org.apache.log4j.ConsoleAppender
+# ***** A uses PatternLayout.
+log4j.appender.A.layout=org.apache.log4j.PatternLayout
+log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Added: incubator/bigtop/trunk/src/pkg/common/pig/pig.1
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/pig/pig.1?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/pig/pig.1 (added)
+++ incubator/bigtop/trunk/src/pkg/common/pig/pig.1 Tue Jul 19 19:44:48 2011
@@ -0,0 +1,115 @@
+.\" Process this file with
+.\" groff -man -Tascii pig.1
+.\"
+.TH pig 1 "October 2010 " Linux "User Manuals"
+
+.SH NAME
+Pig \- A high-level language for expressing data analysis programs,
+coupled with infrastructure for evaluating these programs.
+
+.SH SYNOPSIS
+
+.B pig
+[options] [-] : Run interactively in grunt shell.
+
+.B pig
+[options] -e[xecute] cmd [cmd ...] : Run cmd(s).
+
+.B pig
+[options] [-f[ile]] file : Run cmds found in file.
+
+.SH DESCRIPTION
+
+Apache 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.
+
+For more information about Pig, see http://pig.apache.org.
+
+.SH OPTIONS
+
+.IP "-4, -log4jconf"
+log4j configuration file, overrides log conf
+
+.IP "-b, -brief"
+brief logging (no timestamps)
+
+.IP "-c, -cluster"
+clustername, kryptonite is default
+
+.IP "-d, -debug"
+debug level, INFO is default
+
+.IP "-e, -execute"
+commands to execute (within quotes)
+
+.IP "-f, -file"
+path to the script to execute
+
+.IP "-h, -help"
+display this message
+
+.IP "-i, -version"
+display version information
+
+.IP "-j, -jar jarfile"
+load jarfile
+
+.IP "-l, -logfile"
+path to client side log file; current working directory is default
+
+.IP "-m, -param_file"
+path to the parameter file
+
+.IP "-p, -param"
+key value pair of the form param=val
+
+.IP "-r, -dryrun"
+
+.IP "-t, -optimizer_off"
+optimizer rule name, turn optimizer off for this rule; use all to turn
+all rules off, optimizer is turned on by default
+
+.IP "-v, -verbose"
+print all error messages to screen
+
+.IP "-w, -warning"
+turn warning on; also turns warning aggregation off
+
+.IP "-x, -exectype=[local|mapreduce]"
+execution type; mapreduce is default
+
+.IP "-F, -stop_on_failure"
+aborts execution on the first failed job; off by default
+
+.IP "-M, -no_multiquery"
+turn multiquery optimization off; Multiquery is on by default
+
+.SH ENVIRONMENT
+
+.IP JAVA_HOME
+The java implementation to use.
+
+.IP PIG_CLASSPATH
+Extra Java CLASSPATH entries.
+
+.IP PIG_HEAPSIZE
+The maximum amount of heap to use, in MB. Default is 1000.
+
+.IP PIG_OPTS
+Extra Java runtime options.
+
+.IP PIG_CONF_DIR
+Alternate conf dir. Default is ${PIG_HOME}/conf.
+
+.IP PIG_ROOT_LOGGER
+The root appender. Default is INFO,console.
+
+.IP HADOOP_HOME
+Optionally, the Hadoop home to run with.
+
+.SH COPYRIGHT
+Copyright (C) 2010 The Apache Software Foundation. All rights reserved.

Added: incubator/bigtop/trunk/src/pkg/common/pig/pig.properties
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/pig/pig.properties?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/pig/pig.properties (added)
+++ incubator/bigtop/trunk/src/pkg/common/pig/pig.properties Tue Jul 19 19:44:48 2011
@@ -0,0 +1,54 @@
+# Pig configuration file. All values can be overwritten by command line arguments.
+# see bin/pig -help
+
+# log4jconf log4j configuration file
+# log4jconf=./conf/log4j.properties
+
+# brief logging (no timestamps)
+brief=false
+
+# clustername, name of the hadoop jobtracker. If no port is defined port 50020 will be used. 
+#cluster
+
+#debug level, INFO is default
+debug=INFO
+
+# a file that contains pig script
+#file=
+
+# load jarfile, colon separated
+#jar=
+
+#verbose print all log messages to screen (default to print only INFO and above to screen)
+verbose=false
+
+#exectype local|mapreduce, mapreduce is default
+#exectype=mapreduce
+# hod realted properties
+#ssh.gateway
+#hod.expect.root
+#hod.expect.uselatest
+#hod.command
+#hod.config.dir
+#hod.param
+
+
+#Do not spill temp files smaller than this size (bytes)
+pig.spill.size.threshold=5000000
+#EXPERIMENT: Activate garbage collection when spilling a file bigger than this size (bytes)
+#This should help reduce the number of files being spilled.
+pig.spill.gc.activation.size=40000000
+
+
+######################
+# Everything below this line is Yahoo specific.  Note that I've made
+# (almost) no changes to the lines above to make merging in from Apache
+# easier.  Any values I don't want from above I override below.
+#
+# This file is configured for use with HOD on the production clusters.  If you
+# want to run pig with a static cluster you will need to remove everything
+# below this line and set the cluster value (above) to the
+# hostname and port of your job tracker.
+
+exectype=mapreduce
+log.file=

Added: incubator/bigtop/trunk/src/pkg/common/sqoop/install_sqoop.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/sqoop/install_sqoop.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/sqoop/install_sqoop.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/sqoop/install_sqoop.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,134 @@
+#!/bin/sh
+# Copyright 2009 Cloudera, inc.
+set -ex
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to sqoopdist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/sqoop]
+     --lib-dir=DIR               path to install sqoop home [/usr/lib/sqoop]
+     --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 'lib-dir:' \
+  -l 'installed-lib-dir:' \
+  -l 'bin-dir:' \
+  -l 'examples-dir:' \
+  -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+    usage
+fi
+
+eval set -- "$OPTS"
+set -ex
+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
+        ;;
+        --lib-dir)
+        LIB_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
+
+DOC_DIR=${DOC_DIR:-/usr/share/doc/sqoop}
+LIB_DIR=${LIB_DIR:-/usr/lib/sqoop}
+BIN_DIR=${BIN_DIR:-/usr/lib/sqoop/bin}
+CONF_DIR=/etc/sqoop/
+CONF_DIST_DIR=/etc/sqoop/conf/
+ETC_DIR=${ETC_DIR:-/etc/sqoop}
+MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
+
+
+
+install -d -m 0755 ${PREFIX}/${LIB_DIR}
+
+install -d -m 0755 ${PREFIX}/${LIB_DIR}
+cp sqoop*.jar ${PREFIX}/${LIB_DIR}
+
+install -d -m 0755 ${PREFIX}/${LIB_DIR}/lib
+cp -a lib/*.jar ${PREFIX}/${LIB_DIR}/lib
+
+#install -d -m 0755 ${PREFIX}/${LIB_DIR}/shims
+#cp -a shims/*.jar ${PREFIX}/${LIB_DIR}/shims
+
+install -d -m 0755 $PREFIX/usr/bin
+
+install -d -m 0755 $PREFIX/${BIN_DIR}
+cp bin/* $PREFIX/${BIN_DIR}
+
+install -d -m 0755 $PREFIX/${DOC_DIR}
+cp docs/*.html  $PREFIX/${DOC_DIR}
+cp docs/*.css $PREFIX/${DOC_DIR}
+cp -r docs/api $PREFIX/${DOC_DIR}
+cp -r docs/images $PREFIX/${DOC_DIR}
+
+
+install -d -m 0755 $PREFIX/$MAN_DIR
+for i in sqoop sqoop-codegen sqoop-export sqoop-import-all-tables sqoop-version sqoop-create-hive-table sqoop-help sqoop-list-databases sqoop-eval sqoop-import sqoop-list-tables sqoop-job sqoop-metastore sqoop-merge
+	do echo "Copying manpage $i"
+	cp docs/man/$i* $PREFIX/$MAN_DIR
+	echo "Creating wrapper for $i"
+	wrapper=$PREFIX/usr/bin/$i
+	mkdir -p `dirname $wrapper`
+	cat > $wrapper <<EOF
+#!/bin/sh
+export SQOOP_HOME=$LIB_DIR
+exec $BIN_DIR/$i "\$@"
+EOF
+   chmod 0755 $wrapper
+done
+
+install -d -m 0755 $PREFIX/$ETC_DIR/conf
+(cd ${BUILD_DIR}/conf && tar cf - .) | (cd $PREFIX/$ETC_DIR/conf && tar xf -)
+rm $PREFIX/$ETC_DIR/conf/.gitignore
+
+unlink $PREFIX/$LIB_DIR/conf || /bin/true
+ln -s /etc/sqoop/conf $PREFIX/$LIB_DIR/conf

Propchange: incubator/bigtop/trunk/src/pkg/common/sqoop/install_sqoop.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,179 @@
+#!/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..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() {
+    su -s /bin/sh sqoop -c \
+        "/usr/lib/sqoop/bin/stop-metastore.sh -p $PID_FILE"
+}
+
+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/common/sqoop/sqoop-metastore.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh.suse?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh.suse (added)
+++ incubator/bigtop/trunk/src/pkg/common/sqoop/sqoop-metastore.sh.suse Tue Jul 19 19:44:48 2011
@@ -0,0 +1,138 @@
+#!/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: 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
+#
+### BEGIN INIT INFO
+# Provides:          Sqoop
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $remote_fs
+# Should-Start:      $named
+# Should-Stop:
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Sqoop allows easy imports and exports of data sets between databases and the Hadoop Distributed File System (HDFS).
+### 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
+ERROR_PROGRAM_NOT_CONFIGURED=6
+
+
+RETVAL=0
+NAME=sqoop-metastore
+DESC="Sqoop metastore"
+PID_FILE=/var/run/sqoop/sqoop-metastore.pid
+LOCKFILE="/var/lock/subsys/sqoop-metastore"
+LOGDIR=/var/log/sqoop
+SQOOP_BIN_PATH="/usr/lib/sqoop/bin"
+USER="sqoop"
+GROUP="sqoop"
+
+start() {
+  [ -x ${SQOOP_BIN_PATH}/start-metastore.sh ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+
+  # 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 $USER -g $GROUP "$piddir"
+
+  log_success_msg "Starting $DESC: "
+  start_daemon -u $USER ${SQOOP_BIN_PATH}/start-metastore.sh -p $PID_FILE -l $LOGDIR
+  RETVAL=$?
+  echo
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  [ -x ${SQOOP_BIN_PATH}/stop-metastore.sh ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  log_success_msg "Stopping $DESC: "
+  start_daemon -u $USER ${SQOOP_BIN_PATH}/stop-metastore.sh -p $PID_FILE
+  RETVAL=$?
+  sleep 5
+  echo
+  [ $RETVAL -eq 0 ] && rm -f $LOCKFILE $PIDFILE
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  pidofproc -p $PID_FILE java > /dev/null
+  status=$?
+
+  case "$status" in
+    $STATUS_RUNNING)
+      log_success_msg "$DESC is running"
+      ;;
+    $STATUS_DEAD)
+      log_failure_msg "$DESC is dead and pid file exists"
+      ;;
+    $STATUS_DEAD_AND_LOCK)
+      log_failure_msg "$DESC is dead and lock file exists"
+      ;;
+    $STATUS_NOT_RUNNING)
+      log_failure_msg "$DESC is not running"
+      ;;
+    *)
+      log_failure_msg "$DESC status is unknown"
+      ;;
+  esac
+  return $status
+}
+
+condrestart(){
+  [ -e $LOCKFILE ] && 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

Added: incubator/bigtop/trunk/src/pkg/common/whirr/install_whirr.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/whirr/install_whirr.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/whirr/install_whirr.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/whirr/install_whirr.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,101 @@
+#!/bin/sh
+# Copyright 2010 Cloudera, inc.
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to Whirr dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/whirr]
+     --lib-dir=DIR               path to install Whirr home [/usr/lib/whirr]
+     --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 'lib-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
+        ;;
+        --lib-dir)
+        LIB_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=$PREFIX/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/whirr}
+LIB_DIR=${LIB_DIR:-$PREFIX/usr/lib/whirr}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/whirr}
+EXAMPLES_DIR=${EXAMPLES_DIR:-$DOC_DIR/examples}
+BIN_DIR=${BIN_DIR:-$PREFIX/usr/bin}
+
+# First we'll move everything into lib
+install -d -m 0755 $LIB_DIR
+(cd $BUILD_DIR && tar -cf - .) | (cd $LIB_DIR && tar -xf -)
+
+# Copy in the /usr/bin/whirr wrapper
+install -d -m 0755 $BIN_DIR
+cat > $BIN_DIR/whirr <<EOF
+#!/bin/sh
+
+exec $INSTALLED_LIB_DIR/bin/whirr "\$@"
+EOF
+chmod 755 $BIN_DIR/whirr
+
+install -d -m 0755 $MAN_DIR
+gzip -c whirr.1 > $MAN_DIR/whirr.1.gz

Added: incubator/bigtop/trunk/src/pkg/common/whirr/whirr.1
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/whirr/whirr.1?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/whirr/whirr.1 (added)
+++ incubator/bigtop/trunk/src/pkg/common/whirr/whirr.1 Tue Jul 19 19:44:48 2011
@@ -0,0 +1,73 @@
+.\" Process this file with
+.\" groff -man -Tascii whirr.1
+.\"
+.TH whirr 1 "November 2010 " Linux "User Manuals"
+
+.SH NAME
+\fBwhirr\fR \- run software services on cloud infrastructure
+
+.SH SYNOPSIS
+
+.B whirr
+COMMAND [OPTIONS]
+
+.SH DESCRIPTION
+
+Apache Whirr runs services in the cloud. You don't have to worry about the
+idiosyncrasies of each provider.
+
+For more information about Whirr, see
+http://incubator.apache.org/whirr/.
+
+.SH COMMANDS
+
+.IP "version"
+Print the version number and exit.
+.IP "launch-cluster"
+Launch a new cluster running a service.
+.IP "destroy-cluster"
+Terminate and cleanup resources for a running cluster.
+.IP "list-cluster"
+List the nodes in a cluster.
+
+.SH OPTIONS
+
+.IP "--client-cidrs"
+A comma-separated list of CIDR (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+blocks. E.g. '208.128.0.0/11,108.128.0.0/11'.
+.IP "--cluster-name"
+The name of the cluster to operate on. E.g. 'hadoopcluster'. The cluster name is
+used to tag the instances in some cloud-specific way. For example, in Amazon it
+is used to form the security group name.
+.IP "--config"
+A filename of a properties file containing option properties. Note that Whirr
+properties specified in this file all have a 'whirr.' prefix.
+.IP "--credential"
+The (secret) cloud credential for your account.
+.IP "--hardware-id"
+The type of hardware to use for the instance. This must be compatible with the image ID.
+.IP "--identity"
+The cloud identity (username) for you account.
+.IP "--image-id"
+The ID of the image to use for instances. If not specified then a vanilla Linux image is chosen.
+.IP "--instance-templates"
+The number of instances to launch for each set of roles. E.g. '1 nn+jt,10 dn+tt'
+means one instance with the roles 'nn' (namenode) and 'jt' (jobtracker), and ten
+instances each with the roles 'dn' (datanode) and 'tt' (tasktracker).
+.IP "--location-id"
+The location to launch instances in. If not specified then an arbitrary location will be chosen.
+.IP "--private-key-file"
+The filename of the private key used to connect to instances. Defaults to '~/.ssh/id_rsa'.
+.IP "--provider"
+The name of the cloud provider. Defaults to 'ec2'.
+.IP "--public-key-file"
+The filename of the public key used to connect to instances. Defaults to '~/.ssh/id_rsa.pub'.
+.IP "--run-url-base"
+The base URL for forming run urls from. Change this to host your own set of
+launch scripts, as explained at http://incubator.apache.org/whirr/faq.html.
+.IP "--service-name"
+The name of the service to use. E.g. 'hadoop'. A list of available services is
+printed when the command is run with no arguments.
+
+.SH COPYRIGHT
+Copyright (C) 2010 The Apache Software Foundation. All rights reserved.
\ No newline at end of file

Added: incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh 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/common/zookeeper/hadoop-zookeeper.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh.suse?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh.suse (added)
+++ incubator/bigtop/trunk/src/pkg/common/zookeeper/hadoop-zookeeper.sh.suse Tue Jul 19 19:44:48 2011
@@ -0,0 +1,126 @@
+#!/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 Zookeeper server
+#
+# chkconfig: 345 90 10
+# 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.
+#
+### BEGIN INIT INFO
+# Provides:          hadoop-zookeeper-server
+# Required-Start:    $network $local_fs
+# Should-Start:      $named
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop:
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
+### 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
+
+RETVAL=0
+EXEC_PATH="/usr/bin/zookeeper-server"
+NAME=hadoop-zookeeper-server
+DESC="$NAME"
+PIDFILE=/var/run/zookeeper/zookeeper-server.pid
+LOCKFILE="/var/lock/subsys/zookeeper"
+USER=zookeeper
+
+install -d -m 0755 -o zookeeper -g zookeeper /var/run/zookeeper/
+
+
+start() {
+  [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  log_success_msg "Starting $DESC: "
+  start_daemon -u $USER $EXEC_PATH start
+  RETVAL=$?
+  echo
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  log_success_msg "Stopping $DESC: "
+  start_daemon -u $USER $EXEC_PATH stop
+  RETVAL=$?
+  sleep 5
+  echo
+  [ $RETVAL -eq 0 ] && rm -f $LOCKFILE $PIDFILE
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  pidofproc -p $PIDFILE java > /dev/null
+  status=$?
+
+  case "$status" in
+    $STATUS_RUNNING)
+      log_success_msg "$NAME is running"
+      ;;
+    $STATUS_DEAD)
+      log_failure_msg "$NAME is dead and pid file exists"
+      ;;
+    $STATUS_DEAD_AND_LOCK)
+      log_failure_msg "$NAME is dead and lock file exists"
+      ;;
+    $STATUS_NOT_RUNNING)
+      log_failure_msg "$NAME is not running"
+      ;;
+    *)
+      log_failure_msg "$NAME status is unknown"
+      ;;
+  esac
+  return $status
+}
+
+condrestart(){
+  [ -e $LOCKFILE ] && 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

Added: incubator/bigtop/trunk/src/pkg/common/zookeeper/install_zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/zookeeper/install_zookeeper.sh?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/zookeeper/install_zookeeper.sh (added)
+++ incubator/bigtop/trunk/src/pkg/common/zookeeper/install_zookeeper.sh Tue Jul 19 19:44:48 2011
@@ -0,0 +1,154 @@
+#!/bin/sh
+# Copyright 2009 Cloudera, inc.
+set -ex
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to zookeeper dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/zookeeper]
+     --lib-dir=DIR               path to install zookeeper home [/usr/lib/zookeeper]
+     --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 'lib-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
+        ;;
+        --lib-dir)
+        LIB_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=$PREFIX/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-/usr/share/doc/zookeeper}
+LIB_DIR=${LIB_DIR:-/usr/lib/zookeeper}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/zookeeper}
+BIN_DIR=${BIN_DIR:-/usr/bin}
+CONF_DIR=/etc/zookeeper/conf
+CONF_DIST_DIR=/etc/zookeeper/conf.dist/
+
+install -d -m 0755 $PREFIX/$LIB_DIR/
+rm build/zookeeper-*-javadoc.jar
+rm build/zookeeper-*-bin.jar
+rm build/zookeeper-*-sources.jar
+cp build/zookeeper*.jar $PREFIX/$LIB_DIR/
+
+# Make a symlink of zookeeper.jar to zookeeper-version.jar
+for x in build/zookeeper*jar ; do
+  x=$(basename $x)
+  ln -s $x $PREFIX/$LIB_DIR/zookeeper.jar
+done
+  
+
+install -d -m 0755 $PREFIX/$LIB_DIR/lib
+cp build/lib/*.jar $PREFIX/$LIB_DIR/lib
+
+# Copy in the configuration files
+install -d -m 0755 $PREFIX/$CONF_DIST_DIR
+cp conf/* $PREFIX/$CONF_DIST_DIR/
+ln -s $CONF_DIR $PREFIX/$LIB_DIR/conf
+
+# Copy in the /usr/bin/zookeeper-server wrapper
+install -d -m 0755 $PREFIX/$LIB_DIR/bin
+
+for i in zkServer.sh zkEnv.sh zkCli.sh zkCleanup.sh
+	do cp bin/$i $PREFIX/$LIB_DIR/bin
+	chmod 755 $PREFIX/$LIB_DIR/bin/$i
+done
+
+wrapper=$PREFIX/usr/bin/zookeeper-client
+install -d -m 0755 `dirname $wrapper`
+cat > $wrapper <<EOF
+#!/bin/sh
+export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
+export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}
+export CLASSPATH=\$CLASSPATH:\$ZOOKEEPER_CONF:\$ZOOKEEPER_HOME/*:\$ZOOKEEPER_HOME/lib/*
+export ZOOCFGDIR=\${ZOOCFGDIR:-\$ZOOKEEPER_CONF}
+env CLASSPATH=\$CLASSPATH /usr/lib/zookeeper/bin/zkCli.sh "\$@"
+EOF
+chmod 755 $wrapper
+
+wrapper=$PREFIX/usr/bin/zookeeper-server
+cat > $wrapper <<EOF
+#!/bin/sh
+export ZOOPIDFILE=\${ZOOPIDFILE:-/var/run/zookeeper/zookeeper-server.pid}
+export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
+export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}
+export ZOOCFGDIR=\${ZOOCFGDIR:-\$ZOOKEEPER_CONF}
+export CLASSPATH=\$CLASSPATH:\$ZOOKEEPER_CONF:\$ZOOKEEPER_HOME/*:\$ZOOKEEPER_HOME/lib/*
+export ZOO_LOG_DIR=/var/log/zookeeper
+export ZOO_LOG4J_PROP=INFO,ROLLINGFILE
+export JVMFLAGS=-Dzookeeper.log.threshold=INFO
+env CLASSPATH=\$CLASSPATH /usr/lib/zookeeper/bin/zkServer.sh "\$@"
+EOF
+chmod 755 $wrapper
+
+# Copy in the docs
+install -d -m 0755 $PREFIX/$DOC_DIR
+cp -a $BUILD_DIR/docs/* $PREFIX/$DOC_DIR
+cp *.txt $PREFIX/$DOC_DIR/
+
+install -d -m 0755 $MAN_DIR
+gzip -c zookeeper.1 > $MAN_DIR/zookeeper.1.gz
+
+# Zookeeper log and tx log directory
+install -d -m 1766 $PREFIX/var/log/zookeeper
+install -d -m 1766 $PREFIX/var/log/zookeeper/txlog

Propchange: incubator/bigtop/trunk/src/pkg/common/zookeeper/install_zookeeper.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/bigtop/trunk/src/pkg/common/zookeeper/zookeeper.1
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/common/zookeeper/zookeeper.1?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/common/zookeeper/zookeeper.1 (added)
+++ incubator/bigtop/trunk/src/pkg/common/zookeeper/zookeeper.1 Tue Jul 19 19:44:48 2011
@@ -0,0 +1,48 @@
+.\" Process this file with
+.\" groff -man -Tascii zookeeper.1
+.\"
+.TH zookeeper 1 "November 2010 " Linux "User Manuals"
+
+.SH NAME
+\fBzookeeper\fR \- a high-performance coordination service for distributed applications
+
+.SH SYNOPSIS
+
+.B zookeeper-client
+[-server host:port(,host:port)*] COMMAND [OPTIONS]
+.RS 0
+.B zookeeper-server
+<start|stop|restart|status>
+
+.SH DESCRIPTION
+
+Apache 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.
+
+For more information about ZooKeeper, see
+.RS 0
+http://hadoop.apache.org/zookeeper/.
+
+To find the list of available commands and options for \fBzookeeper-client\fR type:
+\fBzookeeper-client help\fR
+
+.SH ENVIRONMENT
+
+.IP ZOOKEEPER_HOME
+Alternate home directory. Default is /usr/lib/zookeeper.
+
+.IP ZOOKEEPER_CONF
+Alternate conf dir. Default is /etc/zookeeper.
+
+.IP ZOOPIDFILE
+Alternate server PID file. Default is /var/run/zookeeper/zookeeper-server.pid.
+
+.SH COPYRIGHT
+Copyright (C) 2010 The Apache Software Foundation. All rights reserved.
\ No newline at end of file

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

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

Added: incubator/bigtop/trunk/src/pkg/deb/flume/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/flume/control?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/flume/control (added)
+++ incubator/bigtop/trunk/src/pkg/deb/flume/control Tue Jul 19 19:44:48 2011
@@ -0,0 +1,34 @@
+Source: flume
+Section: misc
+Priority: extra
+Maintainer: Alex Newman <newalex@cloudera.com>
+Build-Depends: debhelper (>= 6), ant, sun-java6-jdk, ant-optional, git-core
+Standards-Version: 3.8.0
+Homepage: http://www.cloudera.com
+
+Package: flume
+Architecture: all
+Depends: sun-java6-jre, hadoop-zookeeper, adduser, hadoop
+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-master
+Architecture: all
+Depends: flume (= ${source:Version})
+Description: central administration point for the flume data collection system
+ The Flume master daemon is the central administration and data path control
+ point for flume nodes.
+
+Package: flume-node
+Architecture: all
+Depends: flume (= ${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/trunk/src/pkg/deb/flume/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/flume/copyright?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/flume/copyright (added)
+++ incubator/bigtop/trunk/src/pkg/deb/flume/copyright Tue Jul 19 19:44:48 2011
@@ -0,0 +1,11 @@
+This package was debianized by Alex Newman <newalex@cloudera.com> on
+Mon, 22 Feb 2010 23:07:14 -0800
+
+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

Added: incubator/bigtop/trunk/src/pkg/deb/flume/flume-master.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/pkg/deb/flume/flume-master.init?rev=1148501&view=auto
==============================================================================
--- incubator/bigtop/trunk/src/pkg/deb/flume/flume-master.init (added)
+++ incubator/bigtop/trunk/src/pkg/deb/flume/flume-master.init Tue Jul 19 19:44:48 2011
@@ -0,0 +1,111 @@
+#!/bin/bash
+#
+# (c) Copyright 2010 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.
+#
+### BEGIN INIT INFO
+# Provides:             flume-master
+# Required-Start:       $local_fs $remote_fs $syslog $named $network $time
+# Required-Stop:        $local_fs $remote_fs $syslog $named $network
+# Default-Start:        2 3 4 5
+# Default-Stop:         0 1 6
+# Short-Description:    Cloudera Flume Master
+### END INIT INFO
+# Starts a Flume master
+#
+# description: Flume master
+
+
+export FLUME_HOME=/usr/lib/flume
+export FLUME_LOG_DIR=/var/log/flume
+export FLUME_RUN=/var/run/flume
+export FLUME_PID=${FLUME_RUN}/flume-flume-master.pid
+export DOTIME=3
+install -d -m 0755 -o flume -g flume ${FLUME_RUN}
+
+desc="Flume master daemon"
+
+
+# Checks if the given pid represents a live process.
+# Returns 0 if the pid is a live process, 1 otherwise
+flume_is_process_alive() {
+  local pid="$1"
+  ps -fp $pid | grep $pid | grep flume > /dev/null 2>&1
+}
+
+# Check if the process associated to a pidfile is running.
+# Return 0 if the pidfile exists and the process is running, 1 otherwise
+flume_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"
+
+  flume_is_process_alive $pid
+}
+
+
+start() {
+  echo -n $"Starting $desc (flume-master): "
+  su -s /bin/sh  flume -c '${FLUME_HOME}/bin/flume-daemon.sh start master '
+  echo
+}
+
+stop() {
+  echo -n $"Stopping $desc (flume-master): "
+  su -s /bin/sh  flume -c '${FLUME_HOME}/bin/flume-daemon.sh stop master '
+  [ $? -eq 0 ] && rm -f $FLUME_PID
+  echo
+}
+
+restart() {
+  stop
+  echo "Sleeping for ${DOTIME}"
+  sleep ${DOTIME}
+  start
+}
+
+case "$1" in
+  start)
+    start
+    ;;
+  stop)
+    stop
+    ;;
+  restart|force-reload)
+    restart
+    ;;
+  status)
+    echo -n "${desc} is "
+    if flume_check_pidfile $FLUME_PID ;  then
+      echo "running"
+      RETVAL=0
+    else
+      echo "not running."
+      RETVAL=3
+    fi
+    ;;
+  *)
+    echo $"Usage: $0 {start|stop|restart}"
+    exit 1
+esac
+
+exit $RETVAL



Mime
View raw message