Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…hdfs settings from there
  • Loading branch information...
commit 5731ef114c25e95d1a3930cb2b86c09381a843c9 1 parent fa851e6
@jmhsieh jmhsieh authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 bin/flume
View
11 bin/flume
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.