Browse Source

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@571211 13f79535-47bb-0310-9956-ffa450edef68

Michael Stack 18 years ago
parent
commit
d3c150d7a1
2 changed files with 7 additions and 0 deletions
  1. 1 0
      src/contrib/hbase/CHANGES.txt
  2. 6 0
      src/contrib/hbase/bin/start-hbase.sh

+ 1 - 0
src/contrib/hbase/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

+ 6 - 0
src/contrib/hbase/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