public boolean waitForActiveAndReadyMaster() throws IOException {
    return waitForActiveAndReadyMaster(Long.MAX_VALUE);
  }
Blocks until there is an active master and that master has completed initialization.
@return true if an active master becomes available. false if there are no masters left.
@throws IOException if something goes wrong or timeout occurs
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseClusterInterface.java