public class TestConfig extends Object implements Serializable
getInstance().| Constructor and Description |
|---|
TestConfig() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAdminDescription(AdminDescription ad)
Adds the specified admin description to the test configuration.
|
protected void |
addAgentDescription(AgentDescription ad)
Adds the specified agent description to the test configuration.
|
protected void |
addAsyncEventQueueDescription(AsyncEventQueueDescription aeqd)
Adds the specified async event queue description to the test configuration.
|
protected void |
addBridgeDescription(BridgeDescription bd)
Adds the specified bridge description to the test configuration.
|
protected void |
addCacheDescription(CacheDescription cd)
Adds the specified cache description to the test configuration.
|
protected void |
addClassName(String name)
Stores the classnames for parameters in the parameter map for use by clients.
|
protected void |
addClientCacheDescription(ClientCacheDescription ccd)
Adds the specified client cache description to the test configuration.
|
protected void |
addClientDescription(ClientDescription cd)
Adds the specified client description to the test configuration.
|
protected void |
addClientRegionDescription(ClientRegionDescription crd)
Adds the specified client region description to the test configuration.
|
protected void |
addCloseTask(TestTask task) |
protected void |
addDiskStoreDescription(DiskStoreDescription dsd)
Adds the specified disk store description to the test configuration.
|
protected void |
addDynamicCloseTask(TestTask task) |
protected void |
addEndTask(TestTask task) |
protected void |
addFixedPartitionDescription(FixedPartitionDescription fpd)
Adds the specified fixed partition description to the test configuration.
|
protected void |
addGatewayDescription(GatewayDescription gd)
Adds the specified gateway description to the test configuration.
|
protected void |
addGatewayHubDescription(GatewayHubDescription ghd)
Adds the specified gateway hub description to the test configuration.
|
protected void |
addGatewayReceiverDescription(GatewayReceiverDescription grd)
Adds the specified gateway receiver description to the test configuration.
|
protected void |
addGatewaySenderDescription(GatewaySenderDescription gsd)
Adds the specified gateway sender description to the test configuration.
|
protected void |
addGemFireDescription(GemFireDescription gfd)
Adds the specified GemFire description to the test configuration.
|
protected void |
addHadoopDescription(HadoopDescription hd)
Adds the specified hadoop description to the test configuration.
|
protected void |
addHadoopHostDescription(HostDescription hd)
Adds the specified hadoop host description to the test configuration.
|
protected void |
addHDFSStoreDescription(HDFSStoreDescription hsd)
Adds the specified HDFS description to the test configuration.
|
protected void |
addHostAgentDescription(HostAgentDescription had)
Adds the specified hostagent description to the test configuration.
|
protected void |
addHostDescription(HostDescription hd)
Adds the specified host description to the test configuration.
|
protected void |
addHypericServerInstallDescription(HypericServerInstallDescription hqd)
Adds the specified HypericServerInstall description to the test configuration.
|
protected void |
addInitTask(TestTask task) |
protected void |
addJDKVersionDescription(JDKVersionDescription jvd)
Adds the specified JDK version description to the test configuration.
|
protected void |
addJProbeDescription(JProbeDescription jpd)
Adds the specified jprobe description to the test configuration.
|
protected void |
addParameter(Long key,
Object value)
Puts the parameter value in the configuration table at the specified key.
|
protected void |
addPartitionDescription(PartitionDescription pd)
Adds the specified partition description to the test configuration.
|
protected void |
addPoolDescription(PoolDescription pd)
Adds the specified pool description to the test configuration.
|
protected void |
addRegionDescription(RegionDescription rd)
Adds the specified region description to the test configuration.
|
protected void |
addResourceManagerDescription(ResourceManagerDescription rmd)
Adds the specified resource manager description to the test configuration.
|
protected void |
addSecurityDescription(SecurityDescription sd)
Adds the specified security description to the test configuration.
|
protected void |
addSSLDescription(SSLDescription sd)
Adds the specified SSL description to the test configuration.
|
protected void |
addStartTask(TestTask task) |
protected void |
addStaticCloseTask(TestTask task) |
protected void |
addSystemProperty(String key,
String val)
Adds the specified system property to the test configuration.
|
protected void |
addTask(TestTask task) |
protected void |
addThreadGroup(HydraThreadGroup group)
Adds the specified thread group to the thread group table.
|
protected void |
addToParameter(Long key,
Object value)
Puts the parameter value in the configuration table at the specified key.
|
protected void |
addUnitTest(TestTask task) |
protected void |
addVersionDescription(VersionDescription vd)
Adds the specified version description to the test configuration.
|
protected void |
addVmDescription(VmDescription vmd)
Adds the specified vm description to the test configuration.
|
protected void |
checkForZeroTotalThreads(Vector tasks) |
protected void |
checkReceiverSelector(String receiver,
String selector,
String id) |
void |
configure() |
static TestConfig |
create()
For internal use by hydra master controller only
|
protected static void |
destroy()
For internal use by config parsing tool only
|
protected long |
generateRandomSeed()
For internal hydra use only.
|
AdminDescription |
getAdminDescription(String name) |
Map |
getAdminDescriptions()
Returns a mapping of the logical name of the admin system to
its
AdminDescription. |
AgentDescription |
getAgentDescription(String name) |
Map |
getAgentDescriptions()
Returns a mapping of the logical name of the agent system to
its
AgentDescription. |
protected HostDescription |
getAnyPhysicalHostDescription(String host)
Returns any HostDescription for the given physical host, whether
configured or generated.
|
AsyncEventQueueDescription |
getAsyncEventQueueDescription(String name) |
Map<String,AsyncEventQueueDescription> |
getAsyncEventQueueDescriptions() |
BridgeDescription |
getBridgeDescription(String name) |
Map |
getBridgeDescriptions() |
CacheDescription |
getCacheDescription(String name) |
Map |
getCacheDescriptions() |
List<String> |
getClassNames() |
List<String> |
getClassNames(String prefix) |
ClientCacheDescription |
getClientCacheDescription(String name) |
Map<String,ClientCacheDescription> |
getClientCacheDescriptions() |
ClientDescription |
getClientDescription(String name) |
Map<String,ClientDescription> |
getClientDescriptions() |
Vector |
getClientNames()
Returns the set of logical client names specified by
ClientDescription
objects via ClientPrms.names. |
ClientRegionDescription |
getClientRegionDescription(String name) |
Map<String,ClientRegionDescription> |
getClientRegionDescriptions() |
Vector |
getCloseTasks() |
DiskStoreDescription |
getDiskStoreDescription(String name) |
Map |
getDiskStoreDescriptions() |
Vector |
getDynamicCloseTasksClone() |
Vector |
getDynamicInitTasksClone() |
Vector |
getEndTasks() |
FixedPartitionDescription |
getFixedPartitionDescription(String name) |
Map |
getFixedPartitionDescriptions() |
GatewayDescription |
getGatewayDescription(String name) |
Map |
getGatewayDescriptions() |
GatewayHubDescription |
getGatewayHubDescription(String name) |
Map |
getGatewayHubDescriptions() |
GatewayReceiverDescription |
getGatewayReceiverDescription(String name) |
Map |
getGatewayReceiverDescriptions() |
GatewaySenderDescription |
getGatewaySenderDescription(String name) |
Map |
getGatewaySenderDescriptions() |
GemFireDescription |
getGemFireDescription(String name) |
Map<String,GemFireDescription> |
getGemFireDescriptions()
Returns a mapping of the logical name of the GemFire system to
its
GemFireDescription. |
static Properties |
getGemFireProductVersion() |
HadoopDescription |
getHadoopDescription(String name) |
SortedMap<String,HadoopDescription> |
getHadoopDescriptions()
Returns a mapping of the logical name of the hadoop cluster to
its
HadoopDescription. |
HostDescription |
getHadoopHostDescription(String name) |
protected HostDescription |
getHadoopHostDescriptionForPhysicalHost(String host)
Returns the Hadoop
HostDescription for the given physical host. |
SortedMap<String,HostDescription> |
getHadoopHostDescriptions()
Returns a mapping of the logical name of the hadoop cluster host to
its
HostDescription. |
protected Vector |
getHadoopPhysicalHosts()
Returns the set of physical host names specified in
HadoopDescription objects. |
HDFSStoreDescription |
getHDFSStoreDescription(String name) |
Map |
getHDFSStoreDescriptions() |
HostAgentDescription |
getHostAgentDescription(String name) |
SortedMap<String,HostAgentDescription> |
getHostAgentDescriptions() |
static TestConfig |
getHostAgentInstance()
Gets the singleton instance of the hostagent test configuration.
|
protected static TestConfig |
getHostAgentInstanceFromMaster() |
HostDescription |
getHostDescription(String name) |
SortedMap<String,HostDescription> |
getHostDescriptions()
Returns a mapping of the logical name of the host to
its
HostDescription. |
Vector |
getHostNames()
Returns the set of logical host names specified by
HostDescription
objects via HostPrms.names. |
HypericServerInstallDescription |
getHypericServerInstallDescription(String name) |
Map |
getHypericServerInstallDescriptions() |
Vector |
getInitTasks() |
static TestConfig |
getInstance()
Gets the singleton instance of the test configuration.
|
protected static TestConfig |
getInstanceFromMaster() |
JDKVersionDescription |
getJDKVersionDescription(String name) |
Map<String,JDKVersionDescription> |
getJDKVersionDescriptions()
Returns a mapping of the logical name of the JDK version description to
its
JDKVersionDescription. |
JProbeDescription |
getJProbeDescription(String name) |
Map |
getJProbeDescriptions() |
MasterDescription |
getMasterDescription() |
ConfigHashtable |
getParameters() |
PartitionDescription |
getPartitionDescription(String name) |
Map |
getPartitionDescriptions() |
Vector |
getPhysicalHosts()
Returns the set of physical host names specified by
HostDescription
objects via HostPrms.hostNames. |
Vector |
getPhysicalHostsIncludingHadoop()
Returns the set of physical host names specified by
HostDescription
objects via HostPrms.hostNames as well as host specified by
HadoopDescription objects via HadoopPrms.nameNodeHosts
and HadoopPrms.dataNodeHosts. |
PoolDescription |
getPoolDescription(String name) |
Map |
getPoolDescriptions() |
protected long |
getRandomSeed()
For internal hydra use only.
|
RegionDescription |
getRegionDescription(String name) |
Map |
getRegionDescriptions() |
ResourceManagerDescription |
getResourceManagerDescription(String name) |
Map |
getResourceManagerDescriptions() |
SecurityDescription |
getSecurityDescription(String name) |
Map |
getSecurityDescriptions() |
SSLDescription |
getSSLDescription(String name) |
Map |
getSSLDescriptions() |
Vector |
getStartTasks() |
Map |
getSystemProperties()
Returns all of the Hydra system properties
|
String |
getSystemProperty(String key)
Returns the Hydra system property with for the given
key (name) |
protected TestTask |
getTask(int type,
int index)
Returns the task of the given type at the given index.
|
Vector |
getTasks() |
String |
getTestName() |
String |
getTestUser() |
HydraThreadGroup |
getThreadGroup(String name)
Returns the thread group with the given name, and null if it doesn't exist.
|
Hashtable |
getThreadGroups() |
int |
getTotalThreads()
Returns the total number of threads the client descriptions generate.
|
int |
getTotalVMs()
Returns the total number of vms the client descriptions generate.
|
Vector |
getUnitTests() |
VersionDescription |
getVersionDescription(String name) |
Map<String,VersionDescription> |
getVersionDescriptions()
Returns a mapping of the logical name of the version description to
its
VersionDescription. |
VmDescription |
getVmDescription(String name) |
Map |
getVmDescriptions() |
protected void |
postprocess()
For internal hydra use only.
|
protected void |
setMasterDescription(MasterDescription md) |
void |
setRandomSeed(Long randomSeed)
For internal hydra use only.
|
protected void |
setTestName(String testName) |
protected void |
setTestUser(String testUser) |
void |
share()
For hydra internal use only.
|
static ConfigHashtable |
tab() |
static ConfigHashtable |
tasktab() |
SortedMap |
toSortedMap() |
String |
toString() |
public static TestConfig create()
protected static void destroy()
public static TestConfig getHostAgentInstance()
Prms#noNFS case by using master proxy if necessary.protected static TestConfig getHostAgentInstanceFromMaster()
public static TestConfig getInstance()
Prms#noNFS case by using master proxy if necessary.protected static TestConfig getInstanceFromMaster()
public void configure()
public void share()
public static ConfigHashtable tab()
public static ConfigHashtable tasktab()
public String getTestName()
protected void setTestName(String testName)
public String getTestUser()
protected void setTestUser(String testUser)
public MasterDescription getMasterDescription()
protected void setMasterDescription(MasterDescription md)
public Vector getUnitTests()
protected void addUnitTest(TestTask task)
public Vector getStartTasks()
protected void addStartTask(TestTask task)
public Vector getInitTasks()
protected void addInitTask(TestTask task)
public Vector getDynamicInitTasksClone()
public Vector getTasks()
protected TestTask getTask(int type, int index)
protected void addTask(TestTask task)
public Vector getCloseTasks()
protected void addCloseTask(TestTask task)
protected void addStaticCloseTask(TestTask task)
public Vector getDynamicCloseTasksClone()
protected void addDynamicCloseTask(TestTask task)
public Vector getEndTasks()
protected void addEndTask(TestTask task)
public Hashtable getThreadGroups()
public HydraThreadGroup getThreadGroup(String name)
protected void addThreadGroup(HydraThreadGroup group)
group - the thread group to addHydraConfigException - if a thread group with the same name already existspublic SortedMap<String,HostDescription> getHostDescriptions()
HostDescription.public HostDescription getHostDescription(String name)
public Vector getHostNames()
HostDescription
objects via HostPrms.names.public Vector getPhysicalHosts()
HostDescription
objects via HostPrms.hostNames.public Vector getPhysicalHostsIncludingHadoop()
HostDescription
objects via HostPrms.hostNames as well as host specified by
HadoopDescription objects via HadoopPrms.nameNodeHosts
and HadoopPrms.dataNodeHosts.protected HostDescription getAnyPhysicalHostDescription(String host)
Note that this method assumes that all descriptions for the host have the same configuration, which is safe since hydra requires it.
protected void addHostDescription(HostDescription hd)
hd - the host description to addHydraConfigException - if a host description with the same name already existspublic SortedMap<String,HostDescription> getHadoopHostDescriptions()
HostDescription.public HostDescription getHadoopHostDescription(String name)
protected void addHadoopHostDescription(HostDescription hd)
hd - the hadoop host description to addHydraConfigException - if a hadoop host description with the same name already existsprotected HostDescription getHadoopHostDescriptionForPhysicalHost(String host)
HostDescription for the given physical host.protected Vector getHadoopPhysicalHosts()
HadoopDescription objects.public SortedMap<String,HadoopDescription> getHadoopDescriptions()
HadoopDescription.public HadoopDescription getHadoopDescription(String name)
protected void addHadoopDescription(HadoopDescription hd)
hd - the hadoop description to addHydraConfigException - if a hadoop description with the same name already existspublic Map<String,GemFireDescription> getGemFireDescriptions()
GemFireDescription.public GemFireDescription getGemFireDescription(String name)
protected void addGemFireDescription(GemFireDescription gfd)
gfd - the GemFire description to addHydraConfigException - if a GemFire description with the same name already existspublic Map<String,JDKVersionDescription> getJDKVersionDescriptions()
JDKVersionDescription.public JDKVersionDescription getJDKVersionDescription(String name)
protected void addJDKVersionDescription(JDKVersionDescription jvd)
jvd - the JDK version description to addHydraConfigException - if a JDK version description with the same name
already existspublic Map<String,VersionDescription> getVersionDescriptions()
VersionDescription.public VersionDescription getVersionDescription(String name)
protected void addVersionDescription(VersionDescription vd)
vd - the version description to addHydraConfigException - if a version description with the same name
already existspublic Map getAdminDescriptions()
AdminDescription.public AdminDescription getAdminDescription(String name)
protected void addAdminDescription(AdminDescription ad)
ad - the admin description to addHydraConfigException - if an admin description with the same name already existspublic Map getAgentDescriptions()
AgentDescription.public AgentDescription getAgentDescription(String name)
protected void addAgentDescription(AgentDescription ad)
ad - the agent description to addHydraConfigException - if an agent description with the same name already existspublic Map getVmDescriptions()
public VmDescription getVmDescription(String name)
protected void addVmDescription(VmDescription vmd)
vmd - the vm description to addHydraConfigException - if a vm description with the same name already existspublic SortedMap<String,HostAgentDescription> getHostAgentDescriptions()
public HostAgentDescription getHostAgentDescription(String name)
protected void addHostAgentDescription(HostAgentDescription had)
had - the hostagent description to addHydraConfigException - if a hostagent description with the same name already existspublic Map getBridgeDescriptions()
public BridgeDescription getBridgeDescription(String name)
protected void addBridgeDescription(BridgeDescription bd)
bd - the bridge description to addHydraConfigException - if a bridge description with the same name already existspublic Map getPoolDescriptions()
public PoolDescription getPoolDescription(String name)
protected void addPoolDescription(PoolDescription pd)
pd - the pool description to addHydraConfigException - if a pool description with the same name already existspublic Map getDiskStoreDescriptions()
public DiskStoreDescription getDiskStoreDescription(String name)
protected void addDiskStoreDescription(DiskStoreDescription dsd)
dsd - the disk store description to addHydraConfigException - if a disk store description with the same name already existspublic Map getHDFSStoreDescriptions()
public HDFSStoreDescription getHDFSStoreDescription(String name)
protected void addHDFSStoreDescription(HDFSStoreDescription hsd)
hsd - the HDFS store description to addHydraConfigException - if a HDFS store description with the same name already existspublic Map getCacheDescriptions()
public CacheDescription getCacheDescription(String name)
protected void addCacheDescription(CacheDescription cd)
cd - the cache description to addHydraConfigException - if a cache description with the same name already existspublic Map<String,ClientCacheDescription> getClientCacheDescriptions()
public ClientCacheDescription getClientCacheDescription(String name)
protected void addClientCacheDescription(ClientCacheDescription ccd)
ccd - the client cache description to addHydraConfigException - if a client cache description
with the same name already existspublic Map getResourceManagerDescriptions()
public ResourceManagerDescription getResourceManagerDescription(String name)
protected void addResourceManagerDescription(ResourceManagerDescription rmd)
rmd - the resource manager description to addHydraConfigException - if a resource manager description with the same name already existspublic Map getRegionDescriptions()
public RegionDescription getRegionDescription(String name)
protected void addRegionDescription(RegionDescription rd)
rd - the region description to addHydraConfigException - if a region description with the same name already existspublic Map<String,ClientRegionDescription> getClientRegionDescriptions()
public ClientRegionDescription getClientRegionDescription(String name)
protected void addClientRegionDescription(ClientRegionDescription crd)
crd - the client region description to addHydraConfigException - if a client region description
with the same name already existspublic Map getFixedPartitionDescriptions()
public FixedPartitionDescription getFixedPartitionDescription(String name)
protected void addFixedPartitionDescription(FixedPartitionDescription fpd)
fpd - the fixed partition description to addHydraConfigException - if a fixed partition description with the same name already existspublic Map getPartitionDescriptions()
public PartitionDescription getPartitionDescription(String name)
protected void addPartitionDescription(PartitionDescription pd)
pd - the partition description to addHydraConfigException - if a partition description with the same name already existspublic Map getSecurityDescriptions()
public SecurityDescription getSecurityDescription(String name)
protected void addSecurityDescription(SecurityDescription sd)
sd - the security description to addHydraConfigException - if a security description with the same name already existspublic Map getSSLDescriptions()
public SSLDescription getSSLDescription(String name)
protected void addSSLDescription(SSLDescription sd)
sd - the SSL description to addHydraConfigException - if a SSL description with the same name already existspublic Map getGatewayReceiverDescriptions()
public GatewayReceiverDescription getGatewayReceiverDescription(String name)
protected void addGatewayReceiverDescription(GatewayReceiverDescription grd)
grd - the gateway receiver description to addHydraConfigException - if a gateway receiver description with the same name already existspublic Map getGatewaySenderDescriptions()
public GatewaySenderDescription getGatewaySenderDescription(String name)
protected void addGatewaySenderDescription(GatewaySenderDescription gsd)
gsd - the gateway sender description to addHydraConfigException - if a gateway sender description with the same name already existspublic Map<String,AsyncEventQueueDescription> getAsyncEventQueueDescriptions()
public AsyncEventQueueDescription getAsyncEventQueueDescription(String name)
protected void addAsyncEventQueueDescription(AsyncEventQueueDescription aeqd)
aeqd - the async event queue description to addHydraConfigException - if an async event queue description with the same name already existspublic Map getGatewayHubDescriptions()
public GatewayHubDescription getGatewayHubDescription(String name)
protected void addGatewayHubDescription(GatewayHubDescription ghd)
ghd - the gateway hub description to addHydraConfigException - if a gateway hub description with the same name already existspublic Map getGatewayDescriptions()
public GatewayDescription getGatewayDescription(String name)
protected void addGatewayDescription(GatewayDescription gd)
gd - the gateway description to addHydraConfigException - if a gateway description with the same name already existspublic Map<String,ClientDescription> getClientDescriptions()
public ClientDescription getClientDescription(String name)
public Vector getClientNames()
ClientDescription
objects via ClientPrms.names.protected void addClientDescription(ClientDescription cd)
cd - the client description to addHydraConfigException - if a client description with the same name already existspublic int getTotalVMs()
public int getTotalThreads()
public Map getJProbeDescriptions()
public JProbeDescription getJProbeDescription(String name)
protected void addJProbeDescription(JProbeDescription jpd)
jpd - the jprobe description to addHydraConfigException - if a jprobe description with the same name already existspublic Map getHypericServerInstallDescriptions()
public HypericServerInstallDescription getHypericServerInstallDescription(String name)
protected void addHypericServerInstallDescription(HypericServerInstallDescription hqd)
hqd - the HypericServerInstall description to addHydraConfigException - if a HypericServerInstall description with the same name already existspublic Map getSystemProperties()
public String getSystemProperty(String key)
key (name)protected void addSystemProperty(String key, String val)
key - the property keyval - the property valueHydraConfigException - if a property with the same key already exists with a different valuepublic ConfigHashtable getParameters()
protected void addParameter(Long key, Object value)
key - the key, as defined in class Prmsvalue - the valueprotected void addToParameter(Long key, Object value)
key - the key, as defined in class Prmsvalue - the valueprotected void addClassName(String name)
name - the class namepublic SortedMap toSortedMap()
protected void postprocess()
protected long getRandomSeed()
protected long generateRandomSeed()
public void setRandomSeed(Long randomSeed)
public static Properties getGemFireProductVersion()
protected void checkReceiverSelector(String receiver, String selector, String id)
protected void checkForZeroTotalThreads(Vector tasks)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.