@SuppressWarnings("unchecked")
  public JVMClusterUtil.RegionServerThread addRegionServer(Configuration config, final int index)
    throws IOException {
    // Create each regionserver with its own Configuration instance so each has
    // its Connection instance rather than share (see HBASE_INSTANCES down in
    // the guts of ConnectionManager).
    JVMClusterUtil.RegionServerThread rst =
      JVMClusterUtil.createRegionServerThread(config, (Class<? extends HRegionServer>) conf
        .getClass(HConstants.REGION_SERVER_IMPL, this.regionServerClass), index);

    this.regionThreads.add(rst);
    return rst;
  }
Constructor.
@param conf            Configuration to use. Post construction has the master's address.
@param noMasters       Count of masters to start.
@param noRegionServers Count of regionservers to start.
hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java