public static JVMClusterUtil.RegionServerThread createRegionServerThread(final Configuration c,
    final Class<? extends HRegionServer> hrsc, final int index) throws IOException {
    HRegionServer server;
    try {
      Constructor<? extends HRegionServer> ctor = hrsc.getConstructor(Configuration.class);
      ctor.setAccessible(true);
      server = ctor.newInstance(c);
    } catch (InvocationTargetException ite) {
      Throwable target = ite.getTargetException();
      throw new RuntimeException("Failed construction of RegionServer: " + hrsc.toString()
        + ((target.getCause() != null) ? target.getCause().getMessage() : ""), target);
    } catch (Exception e) {
      throw new IOException(e);
    }
    return new JVMClusterUtil.RegionServerThread(server, index);
  }
Creates a {@link RegionServerThread}. Call 'start' on the returned thread to make it run.
@param c     Configuration to use.
@param hrsc  Class to create.
@param index Used distinguishing the object returned.
@return Region server added.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java