@InterfaceAudience.Private public class JVMClusterUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JVMClusterUtil.MasterThread
Datastructure to hold Master Thread and Master instance
|
static class |
JVMClusterUtil.RegionServerThread
Datastructure to hold RegionServer Thread and RegionServer instance
|
Constructor and Description |
---|
JVMClusterUtil() |
Modifier and Type | Method and Description |
---|---|
static JVMClusterUtil.MasterThread |
createMasterThread(org.apache.hadoop.conf.Configuration c,
CoordinatedStateManager cp,
Class<? extends HMaster> hmc,
int index)
Creates a
JVMClusterUtil.MasterThread . |
static JVMClusterUtil.RegionServerThread |
createRegionServerThread(org.apache.hadoop.conf.Configuration c,
CoordinatedStateManager cp,
Class<? extends HRegionServer> hrsc,
int index)
Creates a
JVMClusterUtil.RegionServerThread . |
static void |
shutdown(List<JVMClusterUtil.MasterThread> masters,
List<JVMClusterUtil.RegionServerThread> regionservers) |
static String |
startup(List<JVMClusterUtil.MasterThread> masters,
List<JVMClusterUtil.RegionServerThread> regionservers)
Start the cluster.
|
public static JVMClusterUtil.RegionServerThread createRegionServerThread(org.apache.hadoop.conf.Configuration c, CoordinatedStateManager cp, Class<? extends HRegionServer> hrsc, int index) throws IOException
JVMClusterUtil.RegionServerThread
.
Call 'start' on the returned thread to make it run.c
- Configuration to use.cp
- consensus provider to usehrsc
- Class to create.index
- Used distinguishing the object returned.IOException
public static JVMClusterUtil.MasterThread createMasterThread(org.apache.hadoop.conf.Configuration c, CoordinatedStateManager cp, Class<? extends HMaster> hmc, int index) throws IOException
JVMClusterUtil.MasterThread
.
Call 'start' on the returned thread to make it run.c
- Configuration to use.cp
- consensus provider to usehmc
- Class to create.index
- Used distinguishing the object returned.IOException
public static String startup(List<JVMClusterUtil.MasterThread> masters, List<JVMClusterUtil.RegionServerThread> regionservers) throws IOException
masters
- regionservers
- IOException
public static void shutdown(List<JVMClusterUtil.MasterThread> masters, List<JVMClusterUtil.RegionServerThread> regionservers)
masters
- regionservers
- Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.