incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1356077 - in /incubator/bigtop/branches/branch-0.3: ./ bigtop-packages/src/common/hama/ bigtop-packages/src/common/hama/conf.pseudo/ bigtop-packages/src/deb/hama/ bigtop-packages/src/rpm/hama/ bigtop-packages/src/rpm/hama/SPECS/ bigtop-tes...
Date Mon, 02 Jul 2012 06:15:52 GMT
Author: bmahe
Date: Mon Jul  2 06:15:49 2012
New Revision: 1356077

URL: http://svn.apache.org/viewvc?rev=1356077&view=rev
Log:
BIGTOP-515. Add Apache Hama framework to BigTop distribution (Victor Chugunov and Bruno Mahé via Bruno Mahé)

Added:
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/hama-site.xml
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/do-component-build
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-bspmaster.init
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-groom.init
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama.default
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/install_hama.sh
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/changelog
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/compat
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/control
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/copyright
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-bspmaster.postinst
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.dirs
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.install
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.postinst
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.prerm
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.dirs
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.install
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-groom.postinst
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.dirs
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.install
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.postinst
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.preinst
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.prerm
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/rules
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/
    incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/hama.spec
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/pom.xml
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/TestHamaExamples.groovy
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/pom.xml
Modified:
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/pom.xml
    incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/pom.xml
    incubator/bigtop/branches/branch-0.3/bigtop.mk

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/hama-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/hama-site.xml?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/hama-site.xml (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/conf.pseudo/hama-site.xml Mon Jul  2 06:15:49 2012
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Copyright 2007 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<configuration>
+	<property>
+		<name>bsp.master.address</name>
+		<value>localhost:40000</value>
+		<description>The address of the bsp master server. Either the
+			literal string "local" or a host:port for distributed mode
+		</description>
+	</property>
+
+	<property>
+		<name>fs.default.name</name>
+		<value>local</value>
+		<description>
+			The name of the default file system. Either the literal string
+			"local" or a host:port for HDFS.
+		</description>
+	</property>
+
+	<property>
+		<name>hama.zookeeper.quorum</name>
+		<value>localhost</value>
+		<description>Comma separated list of servers in the ZooKeeper Quorum.
+			For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
+			By default this is set to localhost for local and pseudo-distributed modes
+			of operation. For a fully-distributed setup, this should be set to a full
+			list of ZooKeeper quorum servers. If HAMA_MANAGES_ZK is set in hama-env.sh
+			this is the list of servers which we will start/stop zookeeper on.
+		</description>
+	</property>
+
+	<property>
+		<name>hama.zookeeper.property.clientPort</name>
+		<value>2181</value>
+	</property>
+</configuration>

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/do-component-build
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/do-component-build?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/do-component-build (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/do-component-build Mon Jul  2 06:15:49 2012
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+mvn clean install -DskipTests "$@"

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-bspmaster.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-bspmaster.init?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-bspmaster.init (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-bspmaster.init Mon Jul  2 06:15:49 2012
@@ -0,0 +1,158 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Starts an Apache Hama BSP Master
+#
+# chkconfig: 2345 90 10
+# description: Apache Hama BSP Master
+#
+### BEGIN INIT INFO
+# Provides:          hama-bspmaster
+# Required-Start:    $remote_fs
+# Should-Start:
+# Required-Stop:     $remote_fs
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Apache Hama BSP Master
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+if [ -f /etc/default/hama ] ; then
+  . /etc/default/hama
+fi
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+ERROR_PROGRAM_NOT_INSTALLED=5
+
+HAMA_RUN_DIR=/var/run/hama
+HAMA_LOCK_DIR="/var/lock/subsys/"
+LOCKFILE="${HAMA_LOCK_DIR}/hama-bspmaster"
+desc="Apache Hama BSP Master"
+
+HAMA_USER=hama
+EXEC_PATH=/usr/bin/hama
+HAMA_PID_FILE="${HAMA_RUN_DIR}/hama-bspmaster.pid"
+HAMA_LOG_FILE="${HAMA_LOG_DIR}/hama-bspmaster.log"
+
+# These directories may be tmpfs and may or may not exist
+# depending on the OS (ex: /var/lock/subsys does not exist on debian/ubuntu)
+for dir in "$HAMA_RUN_DIR" "$HAMA_LOCK_DIR"; do
+  [ -d "${dir}" ] || install -d -m 0755 -o $HAMA_USER -g $HAMA_USER ${dir}
+done
+
+start() {
+  [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+
+  checkstatus
+  status=$?
+  if [ "$status" -eq "$STATUS_RUNNING" ]; then
+    exit 0
+  fi
+
+  log_success_msg "Starting $desc: "
+  /bin/su -s /bin/bash -c "/bin/bash -c 'echo \$\$ > ${HAMA_PID_FILE} && exec ${EXEC_PATH} bspmaster >>${HAMA_LOG_FILE} 2>&1' &" $USER
+  RETVAL=$?
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  if [ ! -e $HAMA_PID_FILE ]; then
+    log_failure_msg "Apache Hama BSP Master is not running"
+    exit 0
+  fi
+
+  log_success_msg "Stopping $desc: "
+
+  HAMA_PID=`cat $HAMA_PID_FILE`
+  if [ -n $HAMA_PID ]; then
+    kill -TERM ${HAMA_PID} &>/dev/null
+    sleep 5
+    kill -KILL ${HAMA_PID} &>/dev/null
+  fi
+  rm -f $LOCKFILE $HAMA_PID_FILE
+  return 0
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  pidofproc -p $HAMA_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|condrestart}"
+    exit 1
+esac
+
+exit $RETVAL

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-groom.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-groom.init?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-groom.init (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama-groom.init Mon Jul  2 06:15:49 2012
@@ -0,0 +1,159 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Starts an Apache Hama Groom node
+#
+# chkconfig: 2345 90 10
+# description: Apache Hama Groom node
+#
+### BEGIN INIT INFO
+# Provides:          hama-groom
+# Required-Start:    $remote_fs
+# Should-Start:
+# Required-Stop:     $remote_fs
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Apache Hama Groom node
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+if [ -f /etc/default/hama ] ; then
+  . /etc/default/hama
+fi
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+ERROR_PROGRAM_NOT_INSTALLED=5
+
+HAMA_RUN_DIR=/var/run/hama
+HAMA_LOCK_DIR="/var/lock/subsys/"
+LOCKFILE="${HAMA_LOCK_DIR}/hama-groom"
+desc="Apache Hama Groom node"
+
+HAMA_USER=hama
+EXEC_PATH=/usr/bin/hama
+HAMA_PID_FILE="${HAMA_RUN_DIR}/hama-groom.pid"
+HAMA_LOG_FILE="${HAMA_LOG_DIR}/hama-groom.log"
+
+# These directories may be tmpfs and may or may not exist
+# depending on the OS (ex: /var/lock/subsys does not exist on debian/ubuntu)
+for dir in "$HAMA_RUN_DIR" "$HAMA_LOCK_DIR"; do
+  [ -d "${dir}" ] || install -d -m 0755 -o $HAMA_USER -g $HAMA_USER ${dir}
+done
+
+
+start() {
+  [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+
+  checkstatus
+  status=$?
+  if [ "$status" -eq "$STATUS_RUNNING" ]; then
+    exit 0
+  fi
+
+  log_success_msg "Starting $desc: "
+  /bin/su -s /bin/bash -c "/bin/bash -c 'echo \$\$ > ${HAMA_PID_FILE} && exec ${EXEC_PATH} groom >>${HAMA_LOG_FILE} 2>&1' &" $HAMA_USER
+  RETVAL=$?
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+stop() {
+  if [ ! -e $HAMA_PID_FILE ]; then
+    log_failure_msg "Apache Hama Groom node is not running"
+    exit 0
+  fi
+
+  log_success_msg "Stopping $desc: "
+
+  HAMA_PID=`cat $HAMA_PID_FILE`
+  if [ -n $HAMA_PID ]; then
+    kill -TERM ${HAMA_PID} &>/dev/null
+    sleep 5
+    kill -KILL ${HAMA_PID} &>/dev/null
+  fi
+  rm -f $LOCKFILE $HAMA_PID_FILE
+  return 0
+}
+
+restart() {
+  stop
+  start
+}
+
+checkstatus(){
+  pidofproc -p $HAMA_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|condrestart}"
+    exit 1
+esac
+
+exit $RETVAL

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama.default
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama.default?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama.default (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/hama.default Mon Jul  2 06:15:49 2012
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+export HAMA_HOME=/usr/lib/hama
+export HAMA_CONF_DIR=/etc/hama/conf
+export HAMA_LOG_DIR=/var/log/hama

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/install_hama.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/install_hama.sh?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/install_hama.sh (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/common/hama/install_hama.sh Mon Jul  2 06:15:49 2012
@@ -0,0 +1,171 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to Hama dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --distro-dir=DIR            path to distro specific files (debian/RPM)
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/hama]
+     --lib-dir=DIR               path to install hama home [/usr/lib/hama]
+     --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 'etc-dir:' \
+  -l 'distro-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
+        ;;
+        --distro-dir)
+        DISTRO_DIR=$2 ; shift 2
+        ;;
+        --lib-dir)
+        LIB_DIR=$2 ; shift 2
+        ;;
+        --etc-dir)
+        ETC_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 DISTRO_DIR; do
+  if [ -z "$(eval "echo \$$var")" ]; then
+    echo Missing param: $var
+    usage
+  fi
+done
+
+MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
+DOC_DIR=${DOC_DIR:-/usr/share/doc/hama}
+LIB_DIR=${LIB_DIR:-/usr/lib/hama}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/hama}
+EXAMPLES_DIR=${EXAMPLES_DIR:-$DOC_DIR/examples}
+BIN_DIR=${BIN_DIR:-/usr/bin}
+
+CONF_DIR=/etc/hama/
+CONF_DIST_DIR=${CONF_DIR}/conf.dist/
+ETC_DIR=${ETC_DIR:-${CONF_DIST_DIR}}
+
+install -d -m 0755 $PREFIX/$LIB_DIR
+install -d -m 0755 $PREFIX/$LIB_DIR/bin
+install -d -m 0755 $PREFIX/$LIB_DIR/lib
+install -d -m 0755 $PREFIX/$LIB_DIR/conf
+install -d -m 0755 $PREFIX/$DOC_DIR
+install -d -m 0755 $PREFIX/$ETC_DIR
+install -d -m 0777 $PREFIX/$LIB_DIR/logs
+
+cp -ra ${BUILD_DIR}/lib/* $PREFIX/${LIB_DIR}/lib/
+cp ${BUILD_DIR}/hama*.jar $PREFIX/$LIB_DIR
+cp -a ${BUILD_DIR}/*.txt $PREFIX/$DOC_DIR
+cp -a ${BUILD_DIR}/docs/* $PREFIX/$DOC_DIR
+cp -a ${BUILD_DIR}/bin/* $PREFIX/${LIB_DIR}/bin
+cp -a ${BUILD_DIR}/conf/* $PREFIX/${ETC_DIR}
+
+# Remove unnecessary files
+for f in hama-daemon.sh hama-daemons.sh start-bspd.sh stop-bspd.sh zookeepers.sh; do
+  rm -fv $PREFIX/${LIB_DIR}/bin/$f
+done
+
+# Copy in the /usr/bin/hama wrapper
+install -d -m 0755 $PREFIX/$BIN_DIR
+cat > $PREFIX/$BIN_DIR/hama <<EOF
+
+#!/bin/sh
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+  . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+  . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+. /etc/default/hadoop
+. /etc/default/hama
+
+#FIXME: the following line is a workaround for BIGTOP-259
+export HADOOP_CLASSPATH="`echo /usr/lib/hama/hama-examples-*-job.jar`":\$HADOOP_CLASSPATH
+exec $INSTALLED_LIB_DIR/bin/hama "\$@"
+EOF
+chmod 755 $PREFIX/$BIN_DIR/hama
+
+
+# Make the pseudo-distributed config
+for conf in conf.pseudo ; do
+  install -d -m 0755 $PREFIX/$CONF_DIR/$conf
+  # Install the default configurations
+  (cd ${BUILD_DIR}/conf && tar -cf - .) | (cd $PREFIX/$CONF_DIR/$conf && tar -xf -)
+  # Overlay the -site files
+  (cd $DISTRO_DIR/$conf && tar -cf - .) | (cd $PREFIX/$CONF_DIR/$conf && tar -xf -)
+  # When building straight out of svn we have to account for pesky .svn subdirs
+  rm -rf `find $PREFIX/$CONF_DIR/$conf -name .svn -type d`
+done
+
+
+
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/changelog?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/changelog (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/changelog Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+--- This is auto-generated

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/compat?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/compat (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/compat Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+6

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/control?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/control (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/control Mon Jul  2 06:15:49 2012
@@ -0,0 +1,67 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Source: hama
+Section: misc
+Priority: extra
+Maintainer: BigTop
+Build-Depends: debhelper (>= 6)
+Standards-Version: 3.8.0
+Homepage: http://hama.apache.org
+
+Package:  hama
+Architecture: all
+Depends: hadoop, bigtop-utils, zookeeper
+Description: Hama is a pure BSP(Bulk Synchronous Parallel) computing
+ framework on
+ top of HDFS (Hadoop Distributed File System) for massive scientific
+ computations such as matrix, graph and network algorithms.
+
+Package:  hama-bspmaster
+Architecture: all
+Depends: hama (= ${source:Version})
+Description: Maintain the global state of Apache Hama services
+ BSPMaster is responsible for the following:
+ - Maintaining groom server status.
+ - Maintaining supersteps and other counters in a cluster.
+ - Maintaining job progress information.
+ - Scheduling Jobs and assigning tasks to groom servers
+ - Distributing execution classes and configuration across groom servers.
+ - Providing users with the cluster control interface (web and console based).
+
+Package:  hama-groom
+Architecture: all
+Depends: hama (= ${source:Version})
+Description: A Groom Server (shortly referred to as groom) is a process that launches bsp tasks assigned by BSPMaster
+ A Groom Server (shortly referred to as groom) is a process that launches bsp tasks
+ assigned by BSPMaster. Each groom contacts the BSPMaster, and it takes assigned
+ tasks and reports its status by means of periodical piggybacks with BSPMaster.
+ Each groom is designed to run with HDFS or other distributed storages. Basically,
+ a groom server and a data node should be run on one physical node to get the best performance. (Data-locality)
+
+Package:  hama-conf-pseudo
+Architecture: all
+Depends: hama (= ${source:Version})
+Description: Apache Hama installation in pseudo-distributed mode
+ Installation of this RPM will setup your machine to run in pseudo-distributed mode
+ where each Apache Hama daemon runs in a separate Java process.
+
+Package:  hama-doc
+Architecture: all
+Depends: hama (= ${source:Version})
+Description: Apache Hama Documentation
+ Documentation for Apache Hama
+
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/copyright?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/copyright (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/copyright Mon Jul  2 06:15:49 2012
@@ -0,0 +1,16 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://hama.apache.org/
+Upstream-Name: Apache Hama
+
+Files: *
+Copyright: 2010-2012, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2012, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-bspmaster.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-bspmaster.postinst?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-bspmaster.postinst (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-bspmaster.postinst Mon Jul  2 06:15:49 2012
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+if [ -x "/etc/init.d/hama-bspmaster" ]; then
+	update-rc.d hama-bspmaster defaults >/dev/null
+	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+		invoke-rc.d hama-bspmaster start || :
+	else
+		/etc/init.d/hama-bspmaster start || :
+	fi
+fi

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.dirs
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.dirs?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.dirs (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.dirs Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+/etc/hama/conf.pseudo

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.install?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.install (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.install Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+/etc/hama/conf.pseudo

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.postinst?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.postinst (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.postinst Mon Jul  2 06:15:49 2012
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# postinst script for hama
+#
+# 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)
+        update-alternatives --install /etc/hama/conf hama-conf /etc/hama/conf.pseudo 40
+        if [ ! -e /etc/hama/conf ]; then 
+          ln -s /etc/hama/conf.pseudo /etc/hama/conf 
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.prerm
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.prerm?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.prerm (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-conf-pseudo.prerm Mon Jul  2 06:15:49 2012
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# prerm script for hama
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        update-alternatives --remove hama-conf /etc/hama/conf.pseudo > /dev/null || :
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.dirs
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.dirs?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.dirs (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.dirs Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+usr/share/doc/hama-doc

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.install?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.install (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-doc.install Mon Jul  2 06:15:49 2012
@@ -0,0 +1 @@
+usr/share/doc/hama-doc

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-groom.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-groom.postinst?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-groom.postinst (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama-groom.postinst Mon Jul  2 06:15:49 2012
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+if [ -x "/etc/init.d/hama-groom" ]; then
+	update-rc.d hama-groom defaults >/dev/null
+	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+		invoke-rc.d hama-groom start || :
+	else
+		/etc/init.d/hama-groom start || :
+	fi
+fi

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.dirs
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.dirs?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.dirs (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.dirs Mon Jul  2 06:15:49 2012
@@ -0,0 +1,4 @@
+etc/default
+etc/hama/conf.dist
+usr/bin
+usr/lib/hama

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.install?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.install (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.install Mon Jul  2 06:15:49 2012
@@ -0,0 +1,4 @@
+etc/default/hama
+etc/hama/conf.dist
+usr/bin/hama
+usr/lib/hama

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.postinst?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.postinst (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.postinst Mon Jul  2 06:15:49 2012
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+chmod 0777 /usr/lib/hama/logs
+
+case "$1" in
+    configure)
+        # Install config alternatives
+        update-alternatives  --install /etc/hama/conf hama-conf /etc/hama/conf.dist 30
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.preinst?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.preinst (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.preinst Mon Jul  2 06:15:49 2012
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# preinst script for hama
+#
+# 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 hama >/dev/null; then
+                # Adding system user: hama.
+                adduser \
+                  --system \
+                  --group \
+                  --home /var/lib/hama \
+                  --gecos "Apache Hama User" \
+                  --shell /bin/bash \
+                  hama >/dev/null
+        fi
+	install -d -m 0755 -o hama -g hama /var/log/hama
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.prerm
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.prerm?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.prerm (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/hama.prerm Mon Jul  2 06:15:49 2012
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# prerm script for hama
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+      update-alternatives --remove hama-conf /etc/hama/conf.dist || :
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/rules?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/rules (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/deb/hama/rules Mon Jul  2 06:15:49 2012
@@ -0,0 +1,103 @@
+#!/usr/bin/make -f
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+patch: patch-stamp
+patch-stamp:
+		touch $@
+
+clean:
+		dh_testdir
+		dh_testroot
+		rm -f *-stamp
+		dh_clean
+		rm -Rf debian/tmp
+		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.
+		rm -rf bigtop-empty
+		mkdir -p bigtop-empty
+		sh debian/do-component-build -Drat.basedir=${PWD}/bigtop-empty -Dmaven.repo.local=${HOME}/.m2/repository
+		mkdir -p debian/tmp
+		(cd dist/target/hama-dist-${HAMA_BASE_VERSION}/hama-${HAMA_BASE_VERSION} && tar cf - --exclude=debian/\* .) | (cd debian/tmp && tar xf -)
+		touch $@
+
+install: install-indep
+install-indep:
+		dh_testdir
+		dh_testroot
+		dh_installdirs
+		sh -x debian/install_hama.sh \
+			--distro-dir=debian \
+			--build-dir=debian/tmp \
+			--doc-dir=/usr/share/doc/hama-doc \
+			--prefix=debian/tmp/hama
+		rm debian/tmp/hama/usr/lib/hama/lib/hadoop-*.jar
+		ln -s /usr/lib/hadoop/hadoop-core.jar debian/tmp/hama/usr/lib/hama/lib/hadoop-core.jar
+		rm debian/tmp/hama/usr/lib/hama/lib/zookeeper-*.jar
+		ln -s /usr/lib/zookeeper/zookeeper.jar debian/tmp/hama/usr/lib/hama/lib/zookeeper.jar
+		mkdir -p debian/tmp/hama/etc/default
+		cp debian/hama.default debian/tmp/hama/etc/default/hama
+		dh_install --sourcedir=debian/tmp/hama
+		(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

Added: incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/hama.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/hama.spec?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/hama.spec (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-packages/src/rpm/hama/SPECS/hama.spec Mon Jul  2 06:15:49 2012
@@ -0,0 +1,277 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+%define hama_name hama
+%define lib_hama /usr/lib/%{hama_name}
+%define etc_hama /etc/%{hama_name}
+%define config_hama %{etc_hama}/conf
+%define log_hama /var/log/%{hama_name}
+%define bin_hama /usr/bin
+%define man_dir /usr/share/man
+
+%if  %{?suse_version:1}0
+%define doc_hama %{_docdir}/hama
+%define alternatives_cmd update-alternatives
+%global initd_dir %{_sysconfdir}/rc.d
+%else
+%define doc_hama %{_docdir}/hama-%{hama_version}
+%define alternatives_cmd alternatives
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+%endif
+
+# disable repacking jars
+%define __os_install_post %{nil}
+
+Name: hama
+Version: %{hama_version}
+Release: %{hama_release}
+Summary: A set of Java libraries for scalable machine learning.
+URL: http://hama.apache.org
+Group: Development/Libraries
+BuildArch: noarch
+Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+License: ASL 2.0 
+Source0: %{name}-dist-%{hama_base_version}-source.tar.gz
+Source1: do-component-build 
+Source2: install_%{name}.sh
+Source3: %{name}-bspmaster.init
+Source4: %{name}-groom.init
+Source5: %{name}.default
+Requires: hadoop, bigtop-utils, zookeeper
+
+
+%description 
+Apache Hama is a pure BSP(Bulk Synchronous Parallel) computing framework on top of HDFS (Hadoop Distributed File System) for massive scientific computations such as matrix, graph and network algorithms. Currently, it has the following features:
+
+Job submission and management interface.
+Multiple tasks per node.
+Input/Output Formatter.
+Checkpoint recovery.
+Support to run in the Cloud using Apache Whirr.
+Support to run with Hadoop YARN.
+ 
+
+%package bspmaster
+Summary: Maintain the global state of Apache Hama services
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: /sbin/service
+Requires(pre): %{name} = %{version}-%{release}
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+
+%if  %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%endif
+
+%if  0%{?mgaversion}
+# Required for init scripts
+Requires: initscripts
+%endif
+
+# CentOS 5 does not have any dist macro
+# So I will suppose anything that is not Mageia or a SUSE will be a RHEL/CentOS/Fedora
+%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# Required for init scripts
+Requires: redhat-lsb
+%endif
+
+%description bspmaster
+BSPMaster is responsible for the following:
+- Maintaining groom server status.
+- Maintaining supersteps and other counters in a cluster.
+- Maintaining job progress information.
+- Scheduling Jobs and assigning tasks to groom servers
+- Distributing execution classes and configuration across groom servers.
+- Providing users with the cluster control interface (web and console based). 
+
+
+%package groom
+Summary: A Groom Server (shortly referred to as groom) is a process that launches bsp tasks assigned by BSPMaster
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: /sbin/service
+Requires(pre): %{name} = %{version}-%{release}
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+
+%if  %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%endif
+
+%if  0%{?mgaversion}
+# Required for init scripts
+Requires: initscripts
+%endif
+
+# CentOS 5 does not have any dist macro
+# So I will suppose anything that is not Mageia or a SUSE will be a RHEL/CentOS/Fedora
+%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
+# Required for init scripts
+Requires: redhat-lsb
+%endif
+
+%description groom
+A Groom Server (shortly referred to as groom) is a process that launches bsp tasks
+assigned by BSPMaster. Each groom contacts the BSPMaster, and it takes assigned
+tasks and reports its status by means of periodical piggybacks with BSPMaster.
+Each groom is designed to run with HDFS or other distributed storages. Basically,
+a groom server and a data node should be run on one physical node to get the best performance. (Data-locality) 
+
+
+%package conf-pseudo
+Summary: Apache Hama installation in pseudo-distributed mode
+Group: System/Daemons
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-groom = %{version}-%{release}
+Requires: %{name}-bspmaster = %{version}-%{release}
+Requires: zookeeper-server
+
+%description conf-pseudo
+Installation of this RPM will setup your machine to run in pseudo-distributed mode
+where each Apache Hama daemon runs in a separate Java process.
+
+
+%package doc
+Summary: Apache Hama Documentation
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Documentation for Apache Hama
+
+  
+%prep
+%setup -n %{name}-%{hama_base_version}
+
+%build
+bash $RPM_SOURCE_DIR/do-component-build
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+sh -x $RPM_SOURCE_DIR/install_hama.sh \
+          --distro-dir=$RPM_SOURCE_DIR \
+          --build-dir=dist/target/hama-dist-%{hama_base_version}/hama-%{hama_base_version} \
+          --prefix=$RPM_BUILD_ROOT \
+          --doc-dir=%{doc_hama} 
+
+# Reuse Apache Hadoop jar
+rm -f $RPM_BUILD_ROOT/usr/lib/hama/lib/hadoop*.jar
+ln -s /usr/lib/hadoop/hadoop-core.jar $RPM_BUILD_ROOT/usr/lib/hama/lib/hadoop-core.jar
+
+# Reuse Apache Zookeeper jar
+rm -f $RPM_BUILD_ROOT/usr/lib/hama/lib/zookeeper*.jar
+ln -s /usr/lib/zookeeper/zookeeper.jar $RPM_BUILD_ROOT/usr/lib/hama/lib/zookeeper.jar
+
+
+# Install init script
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
+
+init_file_bspmaster=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-bspmaster
+%__cp %{SOURCE3} $init_file_bspmaster
+chmod 755 $init_file_bspmaster
+
+init_file_groom=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-groom
+%__cp %{SOURCE4} $init_file_groom
+chmod 755 $init_file_groom
+
+
+# Install default file
+%__install -d -m 0755 $RPM_BUILD_ROOT/etc/default
+%__cp %{SOURCE5} $RPM_BUILD_ROOT/etc/default/%{name}
+
+%pre
+getent group hama >/dev/null || groupadd -r hama
+getent passwd hama >/dev/null || useradd -c "Apache Hama" -s /sbin/nologin -g hama -r -d /var/run/hama hama 2> /dev/null || :
+%__install -d -o hama -g hama -m 0755 /var/log/hama
+
+
+%post
+%{alternatives_cmd} --install %{config_hama} %{hama_name}-conf %{config_hama}.dist 30
+
+%preun
+if [ "$1" = 0 ]; then
+        %{alternatives_cmd} --remove %{hama_name}-conf %{config_hama}.dist || :
+fi
+
+# bspmaster service
+%post bspmaster
+chkconfig --add %{name}-bspmaster
+
+%preun bspmaster
+if [ $1 = 0 ] ; then
+        service %{name}-bspmaster stop > /dev/null 2>&1
+        chkconfig --del %{name}-bspmaster
+fi
+%postun bspmaster
+if [ $1 -ge 1 ]; then
+        service %{name}-bspmaster condrestart >/dev/null 2>&1
+fi
+
+# Groom service
+%post groom
+chkconfig --add %{name}-groom
+
+%preun groom
+if [ $1 = 0 ] ; then
+        service %{name}-groom stop > /dev/null 2>&1
+        chkconfig --del %{name}-groom
+fi
+%postun groom
+if [ $1 -ge 1 ]; then
+        service %{name}-groom condrestart >/dev/null 2>&1
+fi
+
+# Pseudo-distributed Hadoop installation
+%post conf-pseudo
+%{alternatives_cmd} --install %{config_hama} %{name}-conf %{etc_hama}/conf.pseudo 40
+
+%preun conf-pseudo
+if [ "$1" = 0 ]; then
+        %{alternatives_cmd} --remove %{name}-conf %{etc_hama}/conf.pseudo
+fi
+
+
+
+#######################
+#### FILES SECTION ####
+#######################
+%files 
+%defattr(-,root,root,755)
+%config(noreplace) %{config_hama}.dist
+%doc *.txt
+%{lib_hama}
+%{bin_hama}/hama
+%config(noreplace) /etc/default/%{name}
+
+
+%files bspmaster
+%attr(0755,root,root)/%{initd_dir}/%{name}-bspmaster
+
+
+%files groom
+%attr(0755,root,root)/%{initd_dir}/%{name}-groom
+
+%files conf-pseudo
+%defattr(-,root,root)
+%config(noreplace) %attr(755,root,root) %{etc_hama}/conf.pseudo
+
+%files doc
+%defattr(-,root,root)
+%doc %{doc_hama}

Added: incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/pom.xml?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/pom.xml (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/pom.xml Mon Jul  2 06:15:49 2012
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	You under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.bigtop.itest</groupId>
+		<artifactId>bigtop-smokes</artifactId>
+		<version>0.3.1-incubating-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<groupId>org.apache.bigtop.itest</groupId>
+	<artifactId>hama-smoke</artifactId>
+	<version>0.3.1-incubating-SNAPSHOT</version>
+	
+	<name>hamasmoke</name>
+
+	<properties>
+		<hama.version>0.5.0-incubating</hama.version>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.hama</groupId>
+			<artifactId>hama-core</artifactId>
+			<version>${hama.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.hama</groupId>
+			<artifactId>hama-examples</artifactId>
+			<version>${hama.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.hama</groupId>
+			<artifactId>hama-graph</artifactId>
+			<version>${hama.version}</version>
+		</dependency>
+	</dependencies>
+
+</project>

Added: incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/TestHamaExamples.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/TestHamaExamples.groovy?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/TestHamaExamples.groovy (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/hama/src/main/groovy/org/apache/bigtop/itest/hamaexamples/TestHamaExamples.groovy Mon Jul  2 06:15:49 2012
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bigtop.itest.hamaexamples
+
+import org.junit.AfterClass
+import org.junit.BeforeClass
+import static org.junit.Assert.assertNotNull
+import org.apache.bigtop.itest.shell.Shell
+import static org.junit.Assert.assertTrue
+import org.junit.Test
+import org.apache.bigtop.itest.JarContent
+import org.apache.commons.logging.LogFactory
+import org.apache.commons.logging.Log
+
+import org.apache.bigtop.itest.junit.OrderedParameterized
+import org.junit.runners.Parameterized.Parameters
+import org.junit.runner.RunWith
+
+/**
+ * Test Hama examples shipped with the distribution.
+ */
+class TestHamaExamples {
+
+	static private Log LOG = LogFactory.getLog(TestHamaExamples.class);
+
+  	public static final String HADOOP_HOME = System.getenv("HADOOP_HOME");
+  	static {
+    	assertNotNull("HADOOP_HOME is not set", HADOOP_HOME);
+  	}
+  	
+  	static Shell sh = new Shell("/bin/bash -s");
+  
+  @Test
+  void testPiExample() {
+    sh.exec("hama org.apache.hama.examples.ExampleDriver pi");
+    logError(sh);
+
+    assertTrue("Example pi failed",  sh.getRet() == 0);
+  }
+  
+  @Test
+  void testCMBExample() {
+    sh.exec("hama org.apache.hama.examples.ExampleDriver cmb");
+    logError(sh);
+
+    assertTrue("Example cmb failed",  sh.getRet() == 0);
+  }
+  
+  private static void logError (final Shell sh) {
+    if (sh.getRet()) {
+      println ('Failed command: ' + sh.script);
+      println ('\terror code: ' + sh.getRet());
+      println ('\tstdout: ' + sh.getOut());
+      println ('\tstderr: ' + sh.getErr());
+    }
+  }
+}
\ No newline at end of file

Modified: incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/pom.xml?rev=1356077&r1=1356076&r2=1356077&view=diff
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/pom.xml (original)
+++ incubator/bigtop/branches/branch-0.3/bigtop-tests/test-artifacts/pom.xml Mon Jul  2 06:15:49 2012
@@ -41,6 +41,7 @@
     <module>flume</module>
     <module>sqoop</module>
     <module>mahout</module>
+    <module>hama</module>
   </modules>
 
   <properties>

Added: incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/pom.xml?rev=1356077&view=auto
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/pom.xml (added)
+++ incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/hama/pom.xml Mon Jul  2 06:15:49 2012
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	You under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.bigtop.itest</groupId>
+		<artifactId>smoke-tests</artifactId>
+		<version>0.3.1-incubating-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+
+	<groupId>org.apache.bigtop.itest</groupId>
+	<artifactId>hama-smoke-execution</artifactId>
+	<version>0.3.1-incubating-SNAPSHOT</version>
+	<name>Hama smoke test execution</name>
+
+	<properties>
+		<org.apache.maven-dependency-plugin.groupId>org.apache.bigtop.itest</org.apache.maven-dependency-plugin.groupId>
+		<org.apache.maven-dependency-plugin.artifactId>hama-smoke</org.apache.maven-dependency-plugin.artifactId>
+		<org.apache.maven-dependency-plugin.version>${hama-smoke.version}</org.apache.maven-dependency-plugin.version>
+		<org.apache.maven-dependency-plugin.type>jar</org.apache.maven-dependency-plugin.type>
+
+		<HADOOP_HOME>${env.HADOOP_HOME}</HADOOP_HOME>
+		<HAMA_HOME>${env.HAMA_HOME}</HAMA_HOME>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.bigtop.itest</groupId>
+			<artifactId>hama-smoke</artifactId>
+			<version>0.3.1-incubating-SNAPSHOT</version>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-enforcer-plugin</artifactId>
+				<version>1.0</version>
+				<executions>
+					<execution>
+						<id>enforce-property</id>
+						<goals>
+							<goal>enforce</goal>
+						</goals>
+						<configuration>
+							<rules>
+								<requireProperty>
+									<property>HADOOP_HOME</property>
+									<message>HADOOP_HOME env. variable has to be set</message>
+								</requireProperty>
+							</rules>
+							<fail>true</fail>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-failsafe-plugin</artifactId>
+				<version>2.7.1</version>
+				<configuration>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Modified: incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/pom.xml?rev=1356077&r1=1356076&r2=1356077&view=diff
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/pom.xml (original)
+++ incubator/bigtop/branches/branch-0.3/bigtop-tests/test-execution/smokes/pom.xml Mon Jul  2 06:15:49 2012
@@ -53,6 +53,7 @@
     <!--
       End of BOM definitions
     -->
+    <hama-smoke.version>0.3.1-incubating-SNAPSHOT</hama-smoke.version>
   </properties>
 
   <!--
@@ -67,8 +68,8 @@
     <module>flume</module>
     <module>hbase</module>
     <module>mahout</module>
+    <module>hama</module>
   </modules>
-
   <dependencyManagement>
     <dependencies>
       <!-- Import configuration resources for the stack validation -->
@@ -169,7 +170,12 @@
         <version>${sqoop.version}</version>
         <scope>test</scope>
       </dependency>
-
+      <dependency>
+      	<groupId>org.apache.bigtop.itest</groupId>
+      	<artifactId>hama-smoke</artifactId>
+      	<version>${hama-smoke.version}</version>
+      	<scope>test</scope>
+      </dependency>
 <!--
   End of BOM definitions
 -->

Modified: incubator/bigtop/branches/branch-0.3/bigtop.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/branch-0.3/bigtop.mk?rev=1356077&r1=1356076&r2=1356077&view=diff
==============================================================================
--- incubator/bigtop/branches/branch-0.3/bigtop.mk (original)
+++ incubator/bigtop/branches/branch-0.3/bigtop.mk Mon Jul  2 06:15:49 2012
@@ -163,3 +163,15 @@ BIGTOP_UTILS_BASE_VERSION=$(subst -,.,$(
 BIGTOP_UTILS_PKG_VERSION=$(BIGTOP_UTILS_BASE_VERSION)
 BIGTOP_UTILS_RELEASE_VERSION=1
 $(eval $(call PACKAGE,bigtop-utils,BIGTOP_UTILS))
+
+# Hama
+HAMA_NAME=hama
+HAMA_RELNOTES_NAME=Apache Hama
+HAMA_PKG_NAME=hama
+HAMA_BASE_VERSION=0.5.0-incubating
+HAMA_PKG_VERSION=0.5.0
+HAMA_RELEASE_VERSION=1
+HAMA_TARBALL_DST=hama-dist-$(HAMA_BASE_VERSION)-source.tar.gz
+HAMA_TARBALL_SRC=$(HAMA_TARBALL_DST)
+HAMA_SITE=http://people.apache.org/~edwardyoon/dist/0.5-RC2/
+$(eval $(call PACKAGE,hama,HAMA))



Mime
View raw message