chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r887781 - /hadoop/chukwa/trunk/bin/chukwa-config.sh
Date Sun, 06 Dec 2009 21:53:28 GMT
Author: asrabkin
Date: Sun Dec  6 21:53:28 2009
New Revision: 887781

URL: http://svn.apache.org/viewvc?rev=887781&view=rev
Log:
CHUKWA-241. Revise Hadoop jar discovery

Modified:
    hadoop/chukwa/trunk/bin/chukwa-config.sh

Modified: hadoop/chukwa/trunk/bin/chukwa-config.sh
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/bin/chukwa-config.sh?rev=887781&r1=887780&r2=887781&view=diff
==============================================================================
--- hadoop/chukwa/trunk/bin/chukwa-config.sh (original)
+++ hadoop/chukwa/trunk/bin/chukwa-config.sh Sun Dec  6 21:53:28 2009
@@ -112,24 +112,23 @@
 
 if [ -z ${HADOOP_JAR} ]; then
   if [ -z ${HADOOP_HOME} ]; then
-        export HADOOP_HOME=../../..
+    if [ -d ${CHUKWA_HOME}/hadoopjars ]; then
+      echo "WARNING: neither HADOOP_HOME nor HADOOP_JAR is set we we are reverting to defaults
in $CHUKWA_HOME/hadoopjars dir"
+      export HADOOP_JAR=`ls ${CHUKWA_HOME}/hadoopjars/hadoop-*-core.jar`
+    else
+      echo "Please make sure hadoop-*-core.jar exists in ${CHUKWA_HOME}/hadoopjars"
+      exit -1
     fi
+  else
     if [ -d ${HADOOP_HOME} ]; then
-        export HADOOP_JAR=`ls ${HADOOP_HOME}/hadoop-*-core.jar`
-        if [ -z ${HADOOP_JAR} ]; then
-            echo "Please make sure hadoop-*-core.jar exists in ${HADOOP_HOME}"
-            exit -1
-        fi
-    else
-        if [ -d ${CHUKWA_HOME}/hadoopjars ]; then
-            echo "WARNING: neither HADOOP_HOME nor HADOOP_JAR is set we we are reverting
to defaults in $CHUKWA_HOME/hadoopjars dir"
-            export HADOOP_JAR=`ls ${CHUKWA_HOME}/hadoopjars/hadoop-*-core.jar`
-        else
-            echo "Please make sure hadoop-*-core.jar exists in ${CHUKWA_HOME}/hadoopjars"
-            exit -1
-        fi
+      export HADOOP_JAR=`ls ${HADOOP_HOME}/hadoop-*-core.jar`
+      if [ -z ${HADOOP_JAR} ]; then
+        echo "Please make sure hadoop-*-core.jar exists in ${HADOOP_HOME}"
+        exit -1
+      fi
     fi
-fi
+  fi    #end if no HADOOP_HOME 
+fi    
 
 if [ -z "$JAVA_HOME" ] ; then
   echo ERROR! You forgot to set JAVA_HOME in conf/chukwa-env.sh   



Mime
View raw message