Index: dist/pom.xml =================================================================== --- dist/pom.xml (¸®ºñÀü 1238879) +++ dist/pom.xml (ÀÛ¾÷ »çº») @@ -10,11 +10,11 @@ 0.4.0-incubating-SNAPSHOT - hama + hama-dist pom - distribution + dist - - Index: core/conf/hama-env.sh =================================================================== --- core/conf/hama-env.sh (¸®ºñÀü 1238879) +++ core/conf/hama-env.sh (ÀÛ¾÷ »çº») @@ -1,34 +0,0 @@ -# -#/** -# * 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. -# */ - -# Set environment variables here. - -# The java implementation to use. Required. -# export JAVA_HOME=/usr/lib/jvm/java-6-sun - -# Where log files are stored. $HAMA_HOME/logs by default. -# export HAMA_LOG_DIR=${HAMA_HOME}/logs - -# Extra ssh options. Empty by default. -# export HAMA_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HAMA_CONF_DIR" - -# Tell Hama whether it should manage it's own instance of Zookeeper or not. -# export HAMA_MANAGES_ZK=true Index: core/conf/groomservers.template =================================================================== --- core/conf/groomservers.template (¸®ºñÀü 1238879) +++ core/conf/groomservers.template (ÀÛ¾÷ »çº») @@ -1 +0,0 @@ -localhost \ No newline at end of file Index: core/conf/hama-default.xml =================================================================== --- core/conf/hama-default.xml (¸®ºñÀü 1238879) +++ core/conf/hama-default.xml (ÀÛ¾÷ »çº») @@ -1,171 +0,0 @@ - - - - - - bsp.master.address - local - The address of the bsp master server. Either the - literal string "local" or a host[:port] (where host is a name or - IP address) for distributed mode. - - - - bsp.master.port - 40000 - The port master should bind to. - - - bsp.peer.port - 61000 - The port an groom server binds to. - - - bsp.groom.rpc.port - 50000 - The port an groom rpc binds to. - - - bsp.http.infoserver.port - 40013 - The port where the web-interface can be seen. - - - - bsp.groom.report.address - 127.0.0.1:0 - The interface and port that groom server listens on. - Since it is only connected to by the tasks, it uses the local interface. - EXPERT ONLY. Should only be changed if your host does not have the loopback - interface. - - - bsp.system.dir - ${hadoop.tmp.dir}/bsp/system - The shared directory where BSP stores control files. - - - - bsp.local.dir - ${hadoop.tmp.dir}/bsp/local - local directory for temporal store. - - - hama.tmp.dir - /tmp/hama-${user.name} - Temporary directory on the local filesystem. - - - bsp.child.java.opts - -Xmx512m - Java opts for the groom server child processes. - The following symbol, if present, will be interpolated: @taskid@ is replaced - by current TaskID. Any other occurrences of '@' will go unchanged. - For example, to enable verbose gc logging to a file named for the taskid in - /tmp and to set the heap maximum to be a gigabyte, pass a 'value' of: - -Xmx1024m -verbose:gc -Xloggc:/tmp/@taskid@.gc - The configuration variable bsp.child.ulimit can be used to control the - maximum virtual memory of the child processes. - - - - bsp.local.tasks.maximum - 10 - Number of tasks that run in parallel when in local mode. - - - bsp.tasks.maximum - 3 - The maximum number of BSP tasks that will be run simultaneously - by a groom server. - - - - - hama.zookeeper.property.initLimit - 10 - Property from ZooKeeper's config zoo.cfg. - The number of ticks that the initial synchronization phase can take. - - - - hama.zookeeper.property.syncLimit - 5 - Property from ZooKeeper's config zoo.cfg. - The number of ticks that can pass between sending a request and getting an - acknowledgment. - - - - hama.zookeeper.property.dataDir - ${hama.tmp.dir}/zookeeper - Property from ZooKeeper's config zoo.cfg. - The directory where the snapshot is stored. - - - - hama.zookeeper.property.clientPort - 21810 - Property from ZooKeeper's config zoo.cfg. - The port at which the clients will connect. - - - - hama.zookeeper.property.tickTime - 3000 - - - - hama.zookeeper.property.maxClientCnxns - 30 - Property from ZooKeeper's config zoo.cfg. - Limit on number of concurrent connections (at the socket level) that a - single client, identified by IP address, may make to a single member of - the ZooKeeper ensemble. Set high to avoid zk connection issues running - standalone and pseudo-distributed. - - - - - hama.zookeeper.quorum - localhost - 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. - - - - - Index: core/conf/hama-site.xml =================================================================== --- core/conf/hama-site.xml (¸®ºñÀü 1238879) +++ core/conf/hama-site.xml (ÀÛ¾÷ »çº») @@ -1,25 +0,0 @@ - - - - - Index: core/conf/log4j.properties =================================================================== --- core/conf/log4j.properties (¸®ºñÀü 1238879) +++ core/conf/log4j.properties (ÀÛ¾÷ »çº») @@ -1,81 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Define some default values that can be overridden by system properties -hama.root.logger=INFO,console -hama.log.dir=. -hama.log.file=hama.log - -# Define the root logger to the system property "hama.root.logger". -log4j.rootLogger=${hama.root.logger} - -# Logging Threshold -log4j.threshhold=ALL - -# -# Daily Rolling File Appender -# -log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender -log4j.appender.DRFA.File=${hama.log.dir}/${hama.log.file} - -# Rollver at midnight -log4j.appender.DRFA.DatePattern=.yyyy-MM-dd - -# 30-day backup -#log4j.appender.DRFA.MaxBackupIndex=30 -log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout - -# Pattern format: Date LogLevel LoggerName LogMessage -log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n - -# Debugging Pattern format -#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n - -# -# TaskLog Appender -# - -#Default values -hama.tasklog.taskid=null -hama.tasklog.noKeepSplits=4 -hama.tasklog.totalLogFileSize=100 -hama.tasklog.purgeLogSplits=true -hama.tasklog.logsRetainHours=12 - -log4j.appender.TLA=org.apache.hama.bsp.TaskLogAppender -log4j.appender.TLA.taskId=${hama.tasklog.taskid} -log4j.appender.TLA.totalLogFileSize=${hama.tasklog.totalLogFileSize} - -log4j.appender.TLA.layout=org.apache.log4j.PatternLayout -log4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n - -# -# console -# Add "console" to rootlogger above if you want to use this -# -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.target=System.err -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n - -# Custom Logging levels - -#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG -#log4j.logger.org.apache.hadoop.dfs=DEBUG -#log4j.logger.org.apache.hama=DEBUG Index: core/conf/groomservers =================================================================== --- core/conf/groomservers (¸®ºñÀü 1238879) +++ core/conf/groomservers (ÀÛ¾÷ »çº») @@ -1 +0,0 @@ - Index: core/bin/grooms.sh =================================================================== --- core/bin/grooms.sh (¸®ºñÀü 1238879) +++ core/bin/grooms.sh (ÀÛ¾÷ »çº») @@ -1,68 +0,0 @@ -#!/usr/bin/env 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. - - -# Run a shell command on all slave hosts. -# -# Environment Variables -# -# HAMA_GROOMS File naming remote hosts. -# Default is ${HAMA_CONF_DIR}/groomservers. -# HAMA_CONF_DIR Alternate conf dir. Default is ${HAMA_HOME}/conf. -# HAMA_GROOM_SLEEP Seconds to sleep between spawning remote commands. -# HAMA_SSH_OPTS Options passed to ssh when running remote commands. -## - -usage="Usage: grooms.sh [--config confdir] command..." - -# if no args specified, show usage -if [ $# -le 0 ]; then - echo $usage - exit 1 -fi - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -# If the groomservers file is specified in the command line, -# then it takes precedence over the definition in -# hama-env.sh. Save it here. -HOSTLIST=$HAMA_GROOMS - -if [ -f "${HAMA_CONF_DIR}/hama-env.sh" ]; then - . "${HAMA_CONF_DIR}/hama-env.sh" -fi - -if [ "$HOSTLIST" = "" ]; then - if [ "$HAMA_GROOMS" = "" ]; then - export HOSTLIST="${HAMA_CONF_DIR}/groomservers" - else - export HOSTLIST="${HAMA_GROOMS}" - fi -fi - -for groom in `cat "$HOSTLIST"|sed "s/#.*$//;/^$/d"`; do - ssh $HAMA_SSH_OPTS $groom $"${@// /\\ }" \ - 2>&1 | sed "s/^/$groom: /" & - if [ "$HAMA_GROOM_SLEEP" != "" ]; then - sleep $HAMA_GROOM_SLEEP - fi -done - -wait Index: core/bin/zookeepers.sh =================================================================== --- core/bin/zookeepers.sh (¸®ºñÀü 1238879) +++ core/bin/zookeepers.sh (ÀÛ¾÷ »çº») @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -# -#/** -# * Copyright 2009 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. -# */ -# -# Run a shell command on all zookeeper hosts. -# -# Environment Variables -# -# HAMA_CONF_DIR Alternate hama conf dir. Default is ${HAMA_HOME}/conf. -# HAMA_SSH_OPTS Options passed to ssh when running remote commands. -# -# Modelled after $HADOOP_HOME/bin/slaves.sh. - -usage="Usage: zookeepers [--config ] command..." - -# if no args specified, show usage -if [ $# -le 0 ]; then - echo $usage - exit 1 -fi - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -if [ "$HAMA_MANAGES_ZK" = "" ]; then - HAMA_MANAGES_ZK=true -fi - -if [ "$HAMA_MANAGES_ZK" = "true" ]; then - hosts=`"$bin"/hama org.apache.hama.zookeeper.ZKServerTool` - cmd=$"${@// /\\ }" - for zookeeper in $hosts; do - ssh $HAMA_SSH_OPTS $zookeeper $cmd 2>&1 | sed "s/^/$zookeeper: /" & - done -fi - -wait Index: core/bin/hama-daemon.sh =================================================================== --- core/bin/hama-daemon.sh (¸®ºñÀü 1238879) +++ core/bin/hama-daemon.sh (ÀÛ¾÷ »çº») @@ -1,141 +0,0 @@ -#!/usr/bin/env 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. - - -# Runs a Hama command as a daemon. -# -# Environment Variables -# -# HAMA_CONF_DIR Alternate conf dir. Default is ${HAMA_HOME}/conf. -# HAMA_LOG_DIR Where log files are stored. PWD by default. -# HAMA_MASTER host:path where hama code should be rsync'd from -# HAMA_PID_DIR The pid files are stored. /tmp by default. -# HAMA_IDENT_STRING A string representing this instance of hama. $USER by default -# HAMA_NICENESS The scheduling priority for daemons. Defaults to 0. -## - -usage="Usage: hama-daemon.sh [--config ] [--hosts hostlistfile] (start|stop) " - -# if no args specified, show usage -if [ $# -le 1 ]; then - echo $usage - exit 1 -fi - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -# get arguments -startStop=$1 -shift -command=$1 -shift - -hama_rotate_log () -{ - log=$1; - num=5; - if [ -n "$2" ]; then - num=$2 - fi - if [ -f "$log" ]; then # rotate logs - while [ $num -gt 1 ]; do - prev=`expr $num - 1` - [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num" - num=$prev - done - mv "$log" "$log.$num"; - fi -} - -if [ -f "${HAMA_CONF_DIR}/hama-env.sh" ]; then - . "${HAMA_CONF_DIR}/hama-env.sh" -fi - -# get log directory -if [ "$HAMA_LOG_DIR" = "" ]; then - export HAMA_LOG_DIR="$HAMA_HOME/logs" -fi -mkdir -p "$HAMA_LOG_DIR" - -if [ "$HAMA_PID_DIR" = "" ]; then - HAMA_PID_DIR=/tmp -fi - -if [ "$HAMA_IDENT_STRING" = "" ]; then - export HAMA_IDENT_STRING="$USER" -fi - -# some variables -export HAMA_LOGFILE=hama-$HAMA_IDENT_STRING-$command-$HOSTNAME.log -export HAMA_ROOT_LOGGER="INFO,DRFA" -log=$HAMA_LOG_DIR/hama-$HAMA_IDENT_STRING-$command-$HOSTNAME.out -pid=$HAMA_PID_DIR/hama-$HAMA_IDENT_STRING-$command.pid - -# Set default scheduling priority -if [ "$HAMA_NICENESS" = "" ]; then - export HAMA_NICENESS=0 -fi - -case $startStop in - - (start) - - mkdir -p "$HAMA_PID_DIR" - - if [ -f $pid ]; then - if kill -0 `cat $pid` > /dev/null 2>&1; then - echo $command running as process `cat $pid`. Stop it first. - exit 1 - fi - fi - - if [ "$HAMA_MASTER" != "" ]; then - echo rsync from $HAMA_MASTER - rsync -a -e ssh --delete --exclude=.svn --exclude='logs/*' --exclude='contrib/hod/logs/*' $HAMA_MASTER/ "$HAMA_HOME" - fi - - hama_rotate_log $log - echo starting $command, logging to $log - cd "$HAMA_HOME" - nohup nice -n $HAMA_NICENESS "$HAMA_HOME"/bin/hama --config $HAMA_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null & - echo $! > $pid - sleep 1; head "$log" - ;; - - (stop) - - if [ -f $pid ]; then - if kill -0 `cat $pid` > /dev/null 2>&1; then - echo stopping $command - kill `cat $pid` - else - echo no $command to stop - fi - else - echo no $command to stop - fi - ;; - - (*) - echo $usage - exit 1 - ;; - -esac Index: core/bin/hama-config.sh =================================================================== --- core/bin/hama-config.sh (¸®ºñÀü 1238879) +++ core/bin/hama-config.sh (ÀÛ¾÷ »çº») @@ -1,74 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# included in all the hama scripts with source command -# should not be executable directly -# also should not be passed any arguments, since we need original $* - -# resolve links - $0 may be a softlink - -this="$0" -while [ -h "$this" ]; do - ls=`ls -ld "$this"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - this="$link" - else - this=`dirname "$this"`/"$link" - fi -done - -# convert relative path to absolute path -bin=`dirname "$this"` -script=`basename "$this"` -bin=`cd "$bin"; pwd` -this="$bin/$script" - -# the root of the Hama installation -export HAMA_HOME=`dirname "$this"`/.. - -#check to see if the conf dir is given as an optional argument -if [ $# -gt 1 ] -then - if [ "--config" = "$1" ] - then - shift - confdir=$1 - shift - HAMA_CONF_DIR=$confdir - fi -fi - -# Allow alternate conf dir location. -HAMA_CONF_DIR="${HAMA_CONF_DIR:-$HAMA_HOME/conf}" - -# Source the hama-env.sh. -# Will have JAVA_HOME and HAMA_MANAGES_ZK defined. -if [ -f "${HAMA_CONF_DIR}/hama-env.sh" ]; then - . "${HAMA_CONF_DIR}/hama-env.sh" -fi - -#check to see it is specified whether to use the grooms or the -# masters file -if [ $# -gt 1 ] -then - if [ "--hosts" = "$1" ] - then - shift - grooms=$1 - shift - export HAMA_SLAVES="${HAMA_CONF_DIR}/$grooms" - fi -fi Index: core/bin/hama-daemons.sh =================================================================== --- core/bin/hama-daemons.sh (¸®ºñÀü 1238879) +++ core/bin/hama-daemons.sh (ÀÛ¾÷ »çº») @@ -1,45 +0,0 @@ -#!/usr/bin/env 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. - - -# Run a Hama command on all slave hosts. - -usage="Usage: hama-daemons.sh [--config confdir] [--hosts hostlistfile] [start|stop] command args..." - -# if no args specified, show usage -if [ $# -le 1 ]; then - echo $usage - exit 1 -fi - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. $bin/hama-config.sh - -remote_cmd="cd ${HAMA_HOME}; $bin/hama-daemon.sh --config ${HAMA_CONF_DIR} $@" -args="--config ${HAMA_CONF_DIR} $remote_cmd" -command=$2 - -case $command in - (zookeeper) - exec "$bin/zookeepers.sh" $args - ;; - (*) - exec "$bin/grooms.sh" $args - ;; -esac \ No newline at end of file Index: core/bin/stop-bspd.sh =================================================================== --- core/bin/stop-bspd.sh (¸®ºñÀü 1238879) +++ core/bin/stop-bspd.sh (ÀÛ¾÷ »çº») @@ -1,28 +0,0 @@ -#!/usr/bin/env 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. - - -# Stop hama map reduce daemons. Run this on master node. - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -"$bin"/hama-daemon.sh --config $HAMA_CONF_DIR stop bspmaster -"$bin"/hama-daemons.sh --config $HAMA_CONF_DIR stop groom -"$bin"/hama-daemons.sh --config "${HAMA_CONF_DIR}" stop zookeeper Index: core/bin/hama =================================================================== --- core/bin/hama (¸®ºñÀü 1238879) +++ core/bin/hama (ÀÛ¾÷ »çº») @@ -1,186 +0,0 @@ -#!/usr/bin/env 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. - - -# The Hama command script -# -# Environment Variables -# -# JAVA_HOME The java implementation to use. Overrides JAVA_HOME. -# -# HAMA_CLASSPATH Extra Java CLASSPATH entries. -# -# HAMA_HEAPSIZE The maximum amount of heap to use, in MB. -# Default is 1000. -# -# HAMA_OPTS Extra Java runtime options. -# -# HAMA_NAMENODE_OPTS These options are added to HAMA_OPTS -# HAMA_CLIENT_OPTS when the respective command is run. -# HAMA_{COMMAND}_OPTS etc HAMA_JT_OPTS applies to JobTracker -# for e.g. HAMA_CLIENT_OPTS applies to -# more than one command (fs, dfs, fsck, -# dfsadmin etc) -# -# HAMA_CONF_DIR Alternate conf dir. Default is ${HAMA_HOME}/conf. -# -# HAMA_ROOT_LOGGER The root appender. Default is INFO,console -# - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -cygwin=false -case "`uname`" in -CYGWIN*) cygwin=true;; -esac - -# if no args specified, show usage -if [ $# = 0 ]; then - echo "Usage: hama [--config confdir] COMMAND" - echo "where COMMAND is one of:" - echo " bspmaster run the BSP Master node" - echo " groom run the Groom node" - echo " zookeeper run a Zookeeper server" - echo " job manipulate BSP jobs" - echo " jar run a jar file" - echo " or" - echo " CLASSNAME run the class named CLASSNAME" - echo "Most commands print help when invoked w/o parameters." - exit 1 -fi - -# get arguments -COMMAND=$1 -shift - -if [ -f "${HAMA_CONF_DIR}/hama-env.sh" ]; then - . "${HAMA_CONF_DIR}/hama-env.sh" -fi - -# some Java parameters -if [ "$JAVA_HOME" != "" ]; then - #echo "run java in $JAVA_HOME" - JAVA_HOME=$JAVA_HOME -fi - -if [ "$JAVA_HOME" = "" ]; then - echo "Error: JAVA_HOME is not set." - exit 1 -fi - -JAVA=$JAVA_HOME/bin/java -JAVA_HEAP_MAX=-Xmx1000m - -# check envvars which might override default args -if [ "$HAMA_HEAPSIZE" != "" ]; then - #echo "run with heapsize $HAMA_HEAPSIZE" - JAVA_HEAP_MAX="-Xmx""$HAMA_HEAPSIZE""m" - #echo $JAVA_HEAP_MAX -fi - -# CLASSPATH initially contains $HAMA_CONF_DIR -CLASSPATH="${HAMA_CONF_DIR}" -CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar - -# for developers, add Hama classes to CLASSPATH -if [ -d "$HAMA_HOME/target/classes" ]; then - CLASSPATH=${CLASSPATH}:$HAMA_HOME/target/classes -fi -if [ -d "$HAMA_HOME/target/test-classes/classes" ]; then - CLASSPATH=${CLASSPATH}:$HAMA_HOME/target/test-classes -fi - -# so that filenames w/ spaces are handled correctly in loops below -IFS= - -# for releases, add core hama jar to CLASSPATH -for f in $HAMA_HOME/hama-**.jar; do - CLASSPATH=${CLASSPATH}:$f; -done - -# add libs to CLASSPATH -for f in $HAMA_HOME/lib/*.jar; do - CLASSPATH=${CLASSPATH}:$f; -done - -# add user-specified CLASSPATH last -if [ "$HAMA_CLASSPATH" != "" ]; then - CLASSPATH=${CLASSPATH}:${HAMA_CLASSPATH} -fi - -# default log directory & file -if [ "$HAMA_LOG_DIR" = "" ]; then - HAMA_LOG_DIR="$HAMA_HOME/logs" -fi -if [ "$HAMA_LOGFILE" = "" ]; then - HAMA_LOGFILE='hama.log' -fi - -# default policy file for service-level authorization -if [ "$HAMA_POLICYFILE" = "" ]; then - HAMA_POLICYFILE="hama-policy.xml" -fi - -# restore ordinary behaviour -unset IFS - -# figure out which class to run -if [ "$COMMAND" = "bspmaster" ] ; then - CLASS='org.apache.hama.BSPMasterRunner' - BSP_OPTS="$BSP_OPTS $BSP_BSPMASTER_OPTS" -elif [ "$COMMAND" = "groom" ] ; then - CLASS='org.apache.hama.GroomServerRunner' - BSP_OPTS="$BSP_OPTS $BSP_GROOMSERVER_OPTS" -elif [ "$COMMAND" = "zookeeper" ] ; then - CLASS='org.apache.hama.ZooKeeperRunner' -elif [ "$COMMAND" = "job" ] ; then - CLASS='org.apache.hama.bsp.BSPJobClient' -elif [ "$COMMAND" = "jar" ] ; then - CLASS=org.apache.hama.util.RunJar - BSP_OPTS="$BSP_OPTS" -else - CLASS=$COMMAND -fi - -# cygwin path translation -if $cygwin; then - CLASSPATH=`cygpath -p -w "$CLASSPATH"` - HAMA_HOME=`cygpath -w "$HAMA_HOME"` - HAMA_LOG_DIR=`cygpath -w "$HAMA_LOG_DIR"` - TOOL_PATH=`cygpath -p -w "$TOOL_PATH"` -fi - -# cygwin path translation -if $cygwin; then - JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"` -fi - -HAMA_OPTS="$HAMA_OPTS -Dhama.log.dir=$HAMA_LOG_DIR" -HAMA_OPTS="$HAMA_OPTS -Dhama.log.file=$HAMA_LOGFILE" -HAMA_OPTS="$HAMA_OPTS -Dhama.home.dir=$HAMA_HOME" -HAMA_OPTS="$HAMA_OPTS -Dhama.id.str=$HAMA_IDENT_STRING" -HAMA_OPTS="$HAMA_OPTS -Dhama.root.logger=${HAMA_ROOT_LOGGER:-INFO,console}" -if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then - HAMA_OPTS="$HAMA_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" -fi -HAMA_OPTS="$HAMA_OPTS -Dhama.policy.file=$HAMA_POLICYFILE" - -# run it -exec "$JAVA" $JAVA_HEAP_MAX $HAMA_OPTS -classpath "$CLASSPATH" $CLASS "$@" Index: core/bin/start-bspd.sh =================================================================== --- core/bin/start-bspd.sh (¸®ºñÀü 1238879) +++ core/bin/start-bspd.sh (ÀÛ¾÷ »çº») @@ -1,30 +0,0 @@ -#!/usr/bin/env 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. - - -# Start hama map reduce daemons. Run this on master node. - -bin=`dirname "$0"` -bin=`cd "$bin"; pwd` - -. "$bin"/hama-config.sh - -# start bsp daemons -# start zookeeper first to minimize connection errors at startup -"$bin"/hama-daemons.sh --config "${HAMA_CONF_DIR}" start zookeeper -"$bin"/hama-daemon.sh --config $HAMA_CONF_DIR start bspmaster -"$bin"/hama-daemons.sh --config $HAMA_CONF_DIR start groom Index: core/pom.xml =================================================================== --- core/pom.xml (¸®ºñÀü 1238879) +++ core/pom.xml (ÀÛ¾÷ »çº») @@ -123,7 +123,7 @@ copy-dependencies - ${basedir}/target/lib + ${project.parent.basedir}/lib false true true Index: yarn/pom.xml =================================================================== --- yarn/pom.xml (¸®ºñÀü 1238879) +++ yarn/pom.xml (ÀÛ¾÷ »çº») @@ -65,7 +65,6 @@ 1.5.3 - org.apache.hadoop hadoop-common @@ -98,41 +97,4 @@ - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - ${basedir}/target/lib - false - true - true - - - - - - org.apache.maven.plugins - maven-shade-plugin - 1.4 - - - package - - shade - - - - - - hama-yarn-${project.version} - Index: examples/pom.xml =================================================================== --- examples/pom.xml (¸®ºñÀü 1238879) +++ examples/pom.xml (ÀÛ¾÷ »çº») @@ -46,26 +46,20 @@ hama-examples-${project.version} + org.apache.maven.plugins - maven-shade-plugin - 1.4 - - - package - - shade - - - - - org.apache.hama.examples.ExampleDriver - - - - - + maven-jar-plugin + + + + true + org.apache.hama.examples.ExampleDriver + + + +