2009-05-19 04:30:38 +00:00
|
|
|
# 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 hadoop scripts with source command
|
|
|
|
# should not be executable directly
|
|
|
|
# also should not be passed any arguments, since we need original $*
|
|
|
|
|
2011-01-14 08:01:27 +00:00
|
|
|
# Resolve links ($0 may be a softlink) and convert a relative path
|
|
|
|
# to an absolute path. NB: The -P option requires bash built-ins
|
|
|
|
# or POSIX:2001 compliant cd and pwd.
|
2010-04-29 23:23:53 +00:00
|
|
|
this="${BASH_SOURCE-$0}"
|
2011-01-14 08:01:27 +00:00
|
|
|
common_bin=$(cd -P -- "$(dirname -- "$this")" && pwd -P)
|
|
|
|
script="$(basename -- "$this")"
|
2010-06-10 23:01:33 +00:00
|
|
|
this="$common_bin/$script"
|
2009-05-19 04:30:38 +00:00
|
|
|
|
|
|
|
# the root of the Hadoop installation
|
2011-05-27 16:35:02 +00:00
|
|
|
# See HADOOP-6255 for directory structure layout
|
|
|
|
export HADOOP_PREFIX=`dirname "$this"`/..
|
2009-05-19 04:30:38 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
HADOOP_CONF_DIR=$confdir
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Allow alternate conf dir location.
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -e "${HADOOP_PREFIX}/conf/hadoop-env.sh" ]; then
|
|
|
|
DEFAULT_CONF_DIR="conf"
|
|
|
|
else
|
|
|
|
DEFAULT_CONF_DIR="etc/hadoop"
|
|
|
|
fi
|
|
|
|
|
|
|
|
export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_PREFIX/$DEFAULT_CONF_DIR}"
|
2009-05-19 04:30:38 +00:00
|
|
|
|
2011-05-03 21:19:25 +00:00
|
|
|
# User can specify hostnames or a file where the hostnames are (not both)
|
|
|
|
if [[ ( "$HADOOP_SLAVES" != '' ) && ( "$HADOOP_SLAVE_NAMES" != '' ) ]] ; then
|
|
|
|
echo \
|
|
|
|
"Error: Please specify one variable HADOOP_SLAVES or " \
|
|
|
|
"HADOOP_SLAVE_NAME and not both."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Process command line options that specify hosts or file with host
|
|
|
|
# list
|
2009-05-19 04:30:38 +00:00
|
|
|
if [ $# -gt 1 ]
|
|
|
|
then
|
|
|
|
if [ "--hosts" = "$1" ]
|
|
|
|
then
|
|
|
|
shift
|
2011-05-03 21:19:25 +00:00
|
|
|
export HADOOP_SLAVES="${HADOOP_CONF_DIR}/$$1"
|
|
|
|
shift
|
|
|
|
elif [ "--hostnames" = "$1" ]
|
|
|
|
then
|
|
|
|
shift
|
|
|
|
export HADOOP_SLAVE_NAMES=$1
|
2009-05-19 04:30:38 +00:00
|
|
|
shift
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-05-03 21:19:25 +00:00
|
|
|
# User can specify hostnames or a file where the hostnames are (not both)
|
|
|
|
# (same check as above but now we know it's command line options that cause
|
|
|
|
# the problem)
|
|
|
|
if [[ ( "$HADOOP_SLAVES" != '' ) && ( "$HADOOP_SLAVE_NAMES" != '' ) ]] ; then
|
|
|
|
echo \
|
|
|
|
"Error: Please specify one of --hosts or --hostnames options and not both."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-05-19 04:30:38 +00:00
|
|
|
cygwin=false
|
|
|
|
case "`uname`" in
|
|
|
|
CYGWIN*) cygwin=true;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
|
|
|
|
. "${HADOOP_CONF_DIR}/hadoop-env.sh"
|
|
|
|
fi
|
|
|
|
|
2011-01-23 22:08:34 +00:00
|
|
|
# check if net.ipv6.bindv6only is set to 1
|
|
|
|
bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
|
|
|
|
if [ -n "$bindv6only" ] && [ "$bindv6only" -eq "1" ] && [ "$HADOOP_ALLOW_IPV6" != "yes" ]
|
|
|
|
then
|
|
|
|
echo "Error: \"net.ipv6.bindv6only\" is set to 1 - Java networking could be broken"
|
|
|
|
echo "For more info: http://wiki.apache.org/hadoop/HadoopIPv6"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2011-03-08 23:51:23 +00:00
|
|
|
# Newer versions of glibc use an arena memory allocator that causes virtual
|
|
|
|
# memory usage to explode. This interacts badly with the many threads that
|
|
|
|
# we use in Hadoop. Tune the variable down to prevent vmem explosion.
|
|
|
|
export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
|
|
|
|
|
2011-06-13 22:45:34 +00:00
|
|
|
# Attempt to set JAVA_HOME if it is not set
|
|
|
|
if [[ -z $JAVA_HOME ]]; then
|
|
|
|
# On OSX use java_home (or /Library for older versions)
|
|
|
|
if [ "Darwin" == "$(uname -s)" ]; then
|
|
|
|
if [ -x /usr/libexec/java_home ]; then
|
|
|
|
export JAVA_HOME=($(/usr/libexec/java_home))
|
|
|
|
else
|
|
|
|
export JAVA_HOME=(/Library/Java/Home)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Bail if we did not detect it
|
|
|
|
if [[ -z $JAVA_HOME ]]; then
|
|
|
|
echo "Error: JAVA_HOME is not set and could not be found." 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
JAVA=$JAVA_HOME/bin/java
|
2011-06-13 22:45:34 +00:00
|
|
|
# some Java parameters
|
2009-05-19 04:30:38 +00:00
|
|
|
JAVA_HEAP_MAX=-Xmx1000m
|
|
|
|
|
|
|
|
# check envvars which might override default args
|
|
|
|
if [ "$HADOOP_HEAPSIZE" != "" ]; then
|
|
|
|
#echo "run with heapsize $HADOOP_HEAPSIZE"
|
|
|
|
JAVA_HEAP_MAX="-Xmx""$HADOOP_HEAPSIZE""m"
|
|
|
|
#echo $JAVA_HEAP_MAX
|
|
|
|
fi
|
|
|
|
|
|
|
|
# CLASSPATH initially contains $HADOOP_CONF_DIR
|
|
|
|
CLASSPATH="${HADOOP_CONF_DIR}"
|
|
|
|
|
|
|
|
# for developers, add Hadoop classes to CLASSPATH
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/classes" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/classes
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/webapps" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/test/classes" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/test/classes
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/test/core/classes" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/test/core/classes
|
2010-03-20 02:17:38 +00:00
|
|
|
fi
|
2009-05-19 04:30:38 +00:00
|
|
|
|
|
|
|
# so that filenames w/ spaces are handled correctly in loops below
|
|
|
|
IFS=
|
|
|
|
|
|
|
|
# for releases, add core hadoop jar & webapps to CLASSPATH
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/webapps" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$HADOOP_PREFIX/share/hadoop/common/lib" ]; then
|
|
|
|
for f in $HADOOP_PREFIX/share/hadoop/common/lib/*.jar; do
|
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
2011-05-27 16:35:02 +00:00
|
|
|
|
|
|
|
for f in $HADOOP_PREFIX/share/hadoop/common/*.jar; do
|
2009-05-19 04:30:38 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
# for developers, add libs to CLASSPATH
|
|
|
|
for f in $HADOOP_PREFIX/lib/*.jar; do
|
2009-05-19 04:30:38 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/ivy/lib/Hadoop-Common/common" ]; then
|
|
|
|
for f in $HADOOP_PREFIX/build/ivy/lib/Hadoop-Common/common/*.jar; do
|
2009-07-27 18:34:57 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/ivy/lib/hadoop-hdfs/hdfs" ]; then
|
|
|
|
for f in $HADOOP_PREFIX/build/ivy/lib/hadoop-hdfs/hdfs/*.jar; do
|
2009-07-27 18:34:57 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/ivy/lib/Hadoop/mapred" ]; then
|
|
|
|
for f in $HADOOP_PREFIX/build/ivy/lib/Hadoop/mapred/*.jar; do
|
2009-05-19 04:30:38 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
for f in $HADOOP_PREFIX/lib/jsp-2.1/*.jar; do
|
2009-05-19 04:30:38 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
|
|
|
|
# add user-specified CLASSPATH last
|
|
|
|
if [ "$HADOOP_CLASSPATH" != "" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
|
|
|
|
fi
|
|
|
|
|
|
|
|
# default log directory & file
|
|
|
|
if [ "$HADOOP_LOG_DIR" = "" ]; then
|
2011-05-27 16:35:02 +00:00
|
|
|
HADOOP_LOG_DIR="$HADOOP_PREFIX/logs"
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
if [ "$HADOOP_LOGFILE" = "" ]; then
|
|
|
|
HADOOP_LOGFILE='hadoop.log'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# default policy file for service-level authorization
|
|
|
|
if [ "$HADOOP_POLICYFILE" = "" ]; then
|
|
|
|
HADOOP_POLICYFILE="hadoop-policy.xml"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# restore ordinary behaviour
|
|
|
|
unset IFS
|
|
|
|
|
|
|
|
# cygwin path translation
|
|
|
|
if $cygwin; then
|
2011-05-27 16:35:02 +00:00
|
|
|
HADOOP_PREFIX=`cygpath -w "$HADOOP_PREFIX"`
|
2009-05-19 04:30:38 +00:00
|
|
|
HADOOP_LOG_DIR=`cygpath -w "$HADOOP_LOG_DIR"`
|
2010-08-23 17:29:13 +00:00
|
|
|
JAVA_LIBRARY_PATH=`cygpath -w "$JAVA_LIBRARY_PATH"`
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
2010-08-23 17:29:13 +00:00
|
|
|
|
2009-05-19 04:30:38 +00:00
|
|
|
# setup 'java.library.path' for native-hadoop code if necessary
|
2010-08-23 17:29:13 +00:00
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_PREFIX}/build/native" -o -d "${HADOOP_PREFIX}/lib/native" ]; then
|
2009-09-29 21:26:06 +00:00
|
|
|
JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
|
2009-05-19 04:30:38 +00:00
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "$HADOOP_PREFIX/build/native" ]; then
|
2010-08-23 17:29:13 +00:00
|
|
|
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
|
2011-05-27 16:35:02 +00:00
|
|
|
JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:${HADOOP_PREFIX}/build/native/${JAVA_PLATFORM}/lib
|
2010-08-23 17:29:13 +00:00
|
|
|
else
|
2011-05-27 16:35:02 +00:00
|
|
|
JAVA_LIBRARY_PATH=${HADOOP_PREFIX}/build/native/${JAVA_PLATFORM}/lib
|
2010-08-23 17:29:13 +00:00
|
|
|
fi
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_PREFIX}/lib/native" ]; then
|
2009-05-19 04:30:38 +00:00
|
|
|
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
|
2011-05-27 16:35:02 +00:00
|
|
|
JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:${HADOOP_PREFIX}/lib/native/${JAVA_PLATFORM}
|
2009-05-19 04:30:38 +00:00
|
|
|
else
|
2011-05-27 16:35:02 +00:00
|
|
|
JAVA_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${JAVA_PLATFORM}
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -e "${HADOOP_PREFIX}/lib/libhadoop.a" ]; then
|
|
|
|
JAVA_LIBRARY_PATH=${HADOOP_PREFIX}/lib
|
|
|
|
fi
|
|
|
|
|
2009-05-19 04:30:38 +00:00
|
|
|
# cygwin path translation
|
|
|
|
if $cygwin; then
|
|
|
|
JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"
|
2011-05-27 16:35:02 +00:00
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_PREFIX"
|
2009-05-19 04:30:38 +00:00
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING"
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}"
|
2011-02-16 18:46:54 +00:00
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,console}"
|
2009-05-19 04:30:38 +00:00
|
|
|
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"
|
|
|
|
fi
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.policy.file=$HADOOP_POLICYFILE"
|
|
|
|
|
2011-01-23 22:08:34 +00:00
|
|
|
# Disable ipv6 as it can cause issues
|
|
|
|
HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"
|
|
|
|
|
2009-05-19 04:30:38 +00:00
|
|
|
# put hdfs in classpath if present
|
|
|
|
if [ "$HADOOP_HDFS_HOME" = "" ]; then
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_PREFIX}/share/hadoop/hdfs" ]; then
|
|
|
|
HADOOP_HDFS_HOME=$HADOOP_PREFIX/share/hadoop/hdfs
|
2009-08-24 22:06:54 +00:00
|
|
|
#echo Found HDFS installed at $HADOOP_HDFS_HOME
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "${HADOOP_HDFS_HOME}" ]; then
|
2010-06-10 23:01:33 +00:00
|
|
|
|
|
|
|
if [ -d "$HADOOP_HDFS_HOME/webapps" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "${HADOOP_HDFS_HOME}/conf" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:${HADOOP_HDFS_HOME}/conf
|
|
|
|
fi
|
|
|
|
|
2009-08-24 22:06:54 +00:00
|
|
|
for f in $HADOOP_HDFS_HOME/hadoop-hdfs-*.jar; do
|
2009-05-19 04:30:38 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
|
|
|
|
# add libs to CLASSPATH
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_HDFS_HOME}/lib" ]; then
|
|
|
|
for f in $HADOOP_HDFS_HOME/lib/*.jar; do
|
|
|
|
CLASSPATH=${CLASSPATH}:$f;
|
|
|
|
done
|
|
|
|
fi
|
2009-05-19 04:30:38 +00:00
|
|
|
|
|
|
|
if [ -d "$HADOOP_HDFS_HOME/build/classes" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/classes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-08-24 22:06:54 +00:00
|
|
|
# cygwin path translation
|
|
|
|
if $cygwin; then
|
|
|
|
HADOOP_HDFS_HOME=`cygpath -w "$HADOOP_HDFS_HOME"`
|
|
|
|
fi
|
|
|
|
|
2009-05-19 04:30:38 +00:00
|
|
|
# set mapred home if mapred is present
|
|
|
|
if [ "$HADOOP_MAPRED_HOME" = "" ]; then
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_PREFIX}/share/hadoop/mapreduce" ]; then
|
|
|
|
HADOOP_MAPRED_HOME=$HADOOP_PREFIX/share/hadoop/mapreduce
|
2009-05-19 04:30:38 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-08-24 22:06:54 +00:00
|
|
|
if [ -d "${HADOOP_MAPRED_HOME}" ]; then
|
2010-06-10 23:01:33 +00:00
|
|
|
|
|
|
|
if [ -d "$HADOOP_MAPRED_HOME/webapps" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "${HADOOP_MAPRED_HOME}/conf" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:${HADOOP_MAPRED_HOME}/conf
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
for f in $HADOOP_MAPRED_HOME/hadoop-mapreduce-*.jar; do
|
2009-08-24 22:06:54 +00:00
|
|
|
CLASSPATH=${CLASSPATH}:$f
|
|
|
|
done
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
if [ -d "${HADOOP_MAPRED_HOME}/lib" ]; then
|
|
|
|
for f in $HADOOP_MAPRED_HOME/lib/*.jar; do
|
|
|
|
CLASSPATH=${CLASSPATH}:$f
|
|
|
|
done
|
|
|
|
fi
|
2009-08-24 22:06:54 +00:00
|
|
|
|
|
|
|
if [ -d "$HADOOP_MAPRED_HOME/build/classes" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/classes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$HADOOP_MAPRED_HOME/build/tools" ]; then
|
|
|
|
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/tools
|
|
|
|
fi
|
|
|
|
|
2011-05-27 16:35:02 +00:00
|
|
|
for f in $HADOOP_MAPRED_HOME/hadoop-mapreduce-tools-*.jar; do
|
2009-08-24 22:06:54 +00:00
|
|
|
TOOL_PATH=${TOOL_PATH}:$f;
|
|
|
|
done
|
2011-05-27 16:35:02 +00:00
|
|
|
for f in $HADOOP_MAPRED_HOME/build/hadoop-mapreduce-tools-*.jar; do
|
2009-08-24 22:06:54 +00:00
|
|
|
TOOL_PATH=${TOOL_PATH}:$f;
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
# cygwin path translation
|
|
|
|
if $cygwin; then
|
|
|
|
HADOOP_MAPRED_HOME=`cygpath -w "$HADOOP_MAPRED_HOME"`
|
|
|
|
TOOL_PATH=`cygpath -p -w "$TOOL_PATH"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
|