Permalink
Browse files

FLUME-270: bin/flume should respect HADOOP_CONF_DIR and use core and …

…hdfs settings from there
  • Loading branch information...
1 parent dad99fc commit 08ed2b0d022381b3f1e95623d0d122248831562d @jmhsieh jmhsieh committed Oct 9, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 bin/flume
View
@@ -120,6 +120,17 @@ if [ "$cygwin" == false ] ; then
CLASSPATH+=":${FLUME_CLASSPATH}"
fi
+ # put hadoop conf dir in classpath to include Hadoop
+ # core-site.xml/hdfs-site.xml
+ if [ -n "${HADOOP_CONF_DIR}" ]; then
+ CLASSPATH+=":${HADOOP_CONF_DIR}"
+ elif [ -n "${HADOOP_HOME}" ] ; then
+ CLASSPATH+=":${HADOOP_HOME}/conf"
+ elif [ -e "/usr/lib/hadoop/conf" ] ; then
+ # if neither is present see if the CDH dir exists
+ CLASSPATH+=":/usr/lib/hadoop-0.20/conf";
+ fi # otherwise give up
+
# try to load the hadoop core jars
HADOOP_CORE_FOUND=false
while true; do

0 comments on commit 08ed2b0

Please sign in to comment.