private static JVMClusterUtil.MasterThread
    findActiveMaster(List<JVMClusterUtil.MasterThread> masters) {
    for (JVMClusterUtil.MasterThread t : masters) {
      if (t.master.isActiveMaster()) {
        return t;
      }
    }

    return null;
  }
Creates a {@link MasterThread}. Call 'start' on the returned thread to make it run.
@param c     Configuration to use.
@param hmc   Class to create.
@param index Used distinguishing the object returned.
@return Master added.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java