public MasterThread getMasterThread() {
    for (MasterThread mt : hbaseCluster.getLiveMasters()) {
      if (mt.getMaster().isActiveMaster()) {
        return mt;
      }
    }
    return null;
  }
Returns the current active master thread, if available.
@return the active MasterThread, null if none is active.
hbase-server/src/test/java/org/apache/hadoop/hbase/SingleProcessHBaseCluster.java