blob: 6733ef5f0c96e8222ee4ed2f2f688af58f0bfdd5 [file] [log] [blame]
diff --git a/hadoop/hadoop-0.20.205.0/conf/hadoop-env.sh b/hadoop/hadoop-0.20.205.0/conf/hadoop-env.sh
index ada5bef..76aaf48 100644
--- a/hadoop/hadoop-0.20.205.0/conf/hadoop-env.sh
+++ b/hadoop/hadoop-0.20.205.0/conf/hadoop-env.sh
@@ -5,11 +5,25 @@
# set JAVA_HOME in this file, so that it is correctly defined on
# remote nodes.
+# Mesos build directory, useful for finding JARs and the native library.
+test -z ${MESOS_BUILD_DIR} && \
+ export MESOS_BUILD_DIR=`cd ../.. && pwd`
+
+# Google protobuf (necessary for running the MesosScheduler).
+export PROTOBUF_JAR=${MESOS_BUILD_DIR}/protobuf-2.4.1.jar
+
+# Mesos.
+MESOS_VERSION=`echo @PACKAGE_VERSION@ | ${MESOS_BUILD_DIR}/config.status --file=-:-`
+export MESOS_JAR=${MESOS_BUILD_DIR}/src/mesos-${MESOS_VERSION}.jar
+
+# Native Mesos library.
+export MESOS_NATIVE_LIBRARY=`if test -e ${MESOS_BUILD_DIR}/src/.libs/libmesos.so; then echo ${MESOS_BUILD_DIR}/src/.libs/libmesos.so; elif test -e ${MESOS_BUILD_DIR}/src/.libs/libmesos.dylib; then echo ${MESOS_BUILD_DIR}/src/.libs/libmesos.dylib; fi`
+
# The java implementation to use. Required.
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
# Extra Java CLASSPATH elements. Optional.
-# export HADOOP_CLASSPATH=
+export HADOOP_CLASSPATH=${HADOOP_HOME}/build/contrib/mesos/classes:${MESOS_JAR}:${PROTOBUF_JAR}
# The maximum amount of heap to use, in MB. Default is 1000.
# export HADOOP_HEAPSIZE=2000