MAPREDUCE-2904. Fixed bin/yarn to correctly include HDFS jars and clean up of stale refs to pre-mavenized Hadoop Common and HDFS. Contributed by Sharad Agarwal and Arun C. Murthy.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1162954 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-08-29 19:36:26 +00:00
parent 602dd3c7dc
commit 3380d8f70c
2 changed files with 10 additions and 120 deletions

View File

@ -1163,6 +1163,10 @@ Release 0.23.0 - Unreleased
MAPREDUCE-2898. Javadoc for ContainerManager protocol and related records. MAPREDUCE-2898. Javadoc for ContainerManager protocol and related records.
(acmurthy) (acmurthy)
MAPREDUCE-2904. Fixed bin/yarn to correctly include HDFS jars and
clean up of stale refs to pre-mavenized Hadoop Common and HDFS.
(Sharad Agarwal and Arun C. Murthy via acmurthy)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -148,132 +148,18 @@ IFS=
# add hadoop-common libs to CLASSPATH # add hadoop-common libs to CLASSPATH
if [ -d "$HADOOP_COMMON_HOME/build/classes" ]; then CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/share/hadoop/common'/*'
CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/build/classes CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/share/hadoop/common/lib'/*'
fi
if [ -d "$HADOOP_COMMON_HOME/build/webapps" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/build
fi
if [ -d "$HADOOP_COMMON_HOME/build/test/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/build/test/classes
fi
if [ -d "$HADOOP_COMMON_HOME/build/test/core/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/build/test/core/classes
fi
for f in $HADOOP_COMMON_HOME/hadoop-*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
for f in $HADOOP_COMMON_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
for f in $HADOOP_COMMON_HOME/share/hadoop/common/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
for f in $HADOOP_COMMON_HOME/share/hadoop/common/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
for f in $HADOOP_COMMON_HOME/share/hadoop/hdfs/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
if [ -d "$HADOOP_COMMON_HOME/build/ivy/lib/Hadoop-Common/common" ]; then
for f in $HADOOP_COMMON_HOME/build/ivy/lib/Hadoop-Common/common/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
fi
if [ -d "$HADOOP_COMMON_HOME/build/ivy/lib/Hadoop-Hdfs/common" ]; then
for f in $HADOOP_COMMON_HOME/build/ivy/lib/Hadoop-Hdfs/common/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
fi
if [ -d "$HADOOP_COMMON_HOME/build/ivy/lib/Hadoop/common" ]; then
for f in $HADOOP_COMMON_HOME/build/ivy/lib/Hadoop/common/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
fi
# add hadoop-hdfs libs to CLASSPATH # add hadoop-hdfs libs to CLASSPATH
for f in $HADOOP_HDFS_HOME/hadoop-*.jar; do CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/share/hadoop/hdfs'/*'
CLASSPATH=${CLASSPATH}:$f; CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib'/*'
done
for f in $HADOOP_HDFS_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
if [ -d "$HADOOP_HDFS_HOME/build/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/classes
fi
if [ -d "$HADOOP_HDFS_HOME/build/webapps" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build
fi
if [ -d "$HADOOP_HDFS_HOME/build/test/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/test/classes
fi
if [ -d "$HADOOP_HDFS_HOME/build/tools" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/tools
fi
# add hadoop-mapred libs to CLASSPATH
for f in $HADOOP_HDFS_HOME/hadoop-*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
for f in $HADOOP_HDFS_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
if [ -d "$HADOOP_MAPRED_HOME/build/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/classes
fi
if [ -d "$HADOOP_MAPRED_HOME/build/webapps" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build
fi
if [ -d "$HADOOP_MAPRED_HOME/build/test/classes" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/test/classes
fi
if [ -d "$HADOOP_MAPRED_HOME/build/tools" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/build/tools
fi
# for releases, add core mapred jar & webapps to CLASSPATH
if [ -d "$HADOOP_MAPRED_HOME/webapps" ]; then
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME
fi
# add libs to CLASSPATH
for f in $HADOOP_MAPRED_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
# add libs to CLASSPATH
for f in $HADOOP_MAPRED_HOME/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
# add libs to CLASSPATH
for f in $YARN_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
# add yarn libs to CLASSPATH # add yarn libs to CLASSPATH
for f in $YARN_HOME/modules/*.jar; do
CLASSPATH=${CLASSPATH}:$f;
done
# add user-specified CLASSPATH last CLASSPATH=${CLASSPATH}:$YARN_HOME/modules'/*'
if [ "$YARN_USER_CLASSPATH_FIRST" = "" ] && [ "$YARN_CLASSPATH" != "" ]; then CLASSPATH=${CLASSPATH}:$YARN_HOME/lib'/*'
CLASSPATH=${CLASSPATH}:${YARN_CLASSPATH}
fi
# default log directory & file # default log directory & file
if [ "$YARN_LOG_DIR" = "" ]; then if [ "$YARN_LOG_DIR" = "" ]; then