From 463f847bd458daca0a9dc5cd29a040b6f8887edc Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 30 Aug 2007 15:39:11 +0000 Subject: [PATCH] HADOOP-1802 Startup scripts should wait until hdfs as cleared 'safe mode' M bin/start-hbase.sh Wait to exit 'safe mode' before proceeding w/ startup. If the wait fails, usually because there is no fs, exit with error. git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571211 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + bin/start-hbase.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c593c21efe6..db7d8a4fc37 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,7 @@ Trunk (unreleased changes) HADOOP-1746 Clean up findbugs warnings HADOOP-1757 Bloomfilters: single argument constructor, use enum for bloom filter types + HADOOP-1802 Startup scripts should wait until hdfs as cleared 'safe mode' Below are the list of changes before 2007-08-18 diff --git a/bin/start-hbase.sh b/bin/start-hbase.sh index d0b47dc2444..3060c9e134e 100755 --- a/bin/start-hbase.sh +++ b/bin/start-hbase.sh @@ -32,5 +32,11 @@ bin=`cd "$bin"; pwd` . "$bin"/hbase-config.sh # start hbase daemons +"${HADOOP_HOME}"/bin/hadoop dfsadmin -safemode wait +errCode=$? +if [ $errCode -ne 0 ] +then + exit $errCode +fi "$bin"/hbase-daemon.sh --config="${HADOOP_CONF_DIR}" --hbaseconfig="${HBASE_CONF_DIR}" master start "$bin"/hbase-daemons.sh --config="${HADOOP_CONF_DIR}" --hbaseconfig="${HBASE_CONF_DIR}" regionserver start