CHUKWA-760. Added error message for missing configuration.  (Eric Yang)

Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/2e7c6feb
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/2e7c6feb
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/2e7c6feb

Branch: refs/heads/master
Commit: 2e7c6feb108153e44a46f32e78bc4e1387f4d01b
Parents: 7770e22
Author: Eric Yang <[email protected]>
Authored: Mon Jun 22 10:57:05 2015 -0700
Committer: Eric Yang <[email protected]>
Committed: Mon Jun 22 13:19:47 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt          |  4 +++-
 bin/chukwa-config.sh | 12 +++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/2e7c6feb/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ce31c88..e184e24 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -44,9 +44,11 @@ Trunk (unreleased changes)
 
   BUGS
 
+    CHUKWA-760. Added error message for missing configuration.  (Eric Yang)
+
     CHUKWA-762. Fixed stale test cases.  (Eric Yang)
 
-    CHUKWA-761.  Removed confspell from Chukwa.  (Eric Yang)
+    CHUKWA-761. Removed confspell from Chukwa.  (Eric Yang)
 
     CHUKWA-758. Updated default dashboard to include system metrics.  (Eric 
Yang)
 

http://git-wip-us.apache.org/repos/asf/chukwa/blob/2e7c6feb/bin/chukwa-config.sh
----------------------------------------------------------------------
diff --git a/bin/chukwa-config.sh b/bin/chukwa-config.sh
index bf80c80..203541a 100755
--- a/bin/chukwa-config.sh
+++ b/bin/chukwa-config.sh
@@ -79,7 +79,17 @@ 
CHUKWA_CLASSPATH="${CHUKWA_HOME}/share/chukwa/*:${CHUKWA_HOME}/share/chukwa/lib/
 export CURRENT_DATE=`date +%Y%m%d%H%M`
 
 if [ -z "$JAVA_HOME" ] ; then
-  echo ERROR! You forgot to set JAVA_HOME in CHUKWA_CONF_DIR/chukwa-env.sh   
+  echo ERROR: Cannot find JAVA_HOME in CHUKWA_CONF_DIR/chukwa-env.sh   
+fi
+
+if [ -z "$HADOOP_CONF_DIR" ] ; then
+  echo "ERROR: Cannot find Hadoop configuration in HADOOP_CONF_DIR."
+  exit 1
+fi
+
+if [ -z "$HBASE_CONF_DIR" ] ; then
+  echo "ERROR: Cannot find HBase configuration in HBASE_CONF_DIR."
+  exit 1
 fi
 
 CHUKWA_STOP_TIMEOUT=${CHUKWA_STOP_TIMEOUT:-3}

Reply via email to