See: Description
| Interface | Description |
|---|---|
| BootstrapperProxyIF | |
| CListener |
C interface for C client Java buddies.
|
| Contact |
Interface for pool contacts.
|
| GemFireLocatorAgentIF |
This interface allows the hydra master controller to manage
the GemFire locator.
|
| HostAgentIF |
This interface allows the hydra master controller to manage local and
remote processes, servers, and systems via host agents.
|
| MasterProxyIF | |
| RemoteTestModuleIF |
Exported client methods that can be called remotely
by the master controller.
|
| TaskScheduler |
Interface for task schedulers.
|
| Class | Description |
|---|---|
| AbstractDescription |
Abstract superclass for description objects.
|
| AdminDescription |
Encodes information needed to describe and create an admin distributed
system.
|
| AdminPrms |
A class used to store keys for admin configuration settings.
|
| AgentBlackboard |
Holds a singleton instance per VM.
|
| AgentDescription |
Encodes information needed to describe and create a management agent.
|
| AgentHelper |
Provides support for management agents running in hydra client VMs.
|
| AgentHelper.Endpoint |
Represents the endpoint for an agent.
|
| AgentPrms |
A class used to store keys for agent configuration settings.
|
| AsyncEventQueueDescription |
Encodes information needed to describe and create an async event queue.
|
| AsyncEventQueueHelper |
Provides support for async event queues running in hydra-managed client VMs.
|
| AsyncEventQueuePrms |
A class used to store keys for async event queue configuration
settings.
|
| BasePrms |
A class used to support keys for hydra configuration settings.
|
| BaseTaskScheduler |
This class is the abstract superclass for hydra task schedulers.
|
| Bootstrapper |
Starts the RMI registry used for hydra cross-platform support.
|
| BootstrapperClient |
Client of the Bootstrapper used for multi-host and cross-platform Windows
testing.
|
| BootstrapperProxy | |
| BridgeBlackboard |
Holds a singleton instance per VM.
|
| BridgeDescription |
Encodes information needed to describe and create a bridge server.
|
| BridgeHelper |
Provides support for bridge servers running in hydra-managed client VMs.
|
| BridgeHelper.Endpoint |
Represents the endpoint for a bridge server.
|
| BridgePrms |
A class used to store keys for bridge configuration settings.
|
| BridgeVersionHelper |
Provides version-dependent support for
BridgeHelper. |
| CacheDescription |
Encodes information needed to describe and create a cache.
|
| CacheHelper |
Helps clients use
CacheDescription. |
| CachePrms |
A class used to store keys for cache configuration settings.
|
| CacheServerBlackboard |
Holds a singleton instance per VM.
|
| CacheServerHelper |
Provides support for command-line cache servers managed by hydra clients.
|
| CacheServerHelper.Record |
Represents the runtime record for a cache server.
|
| CacheVersionHelper |
Provides version-dependent support for
CacheHelper. |
| ClientCacheDescription |
Encodes information needed to describe and create a client cache.
|
| ClientCacheHelper |
Helps clients use
ClientCacheDescription. |
| ClientCachePrms |
A class used to store keys for client cache configuration settings.
|
| ClientDescription |
Encodes information needed to describe and start a client process.
|
| ClientInfo |
A ClientInfo represents a hydra client JVM affected by a reboot action
through the
RebootMgr API. |
| ClientMapper |
A ClientMapper knows how to map client threads to thread groups.
|
| ClientMgr |
Creates, starts, and stops client vms, among other things.
|
| ClientNameLockStepTaskScheduler |
This class acts as the task scheduler for tasks that run at the start
and end of a test, in single-threaded VMs started just to run the tasks,
that is, tasks of type STARTTASK and ENDTASK.
|
| ClientNameTaskScheduler |
This class acts as the task scheduler for tasks that run at the start
and end of a test, in single-threaded VMs started just to run the tasks,
that is, tasks of type STARTTASK and ENDTASK.
|
| ClientPrms |
A class used to store keys for client configuration settings.
|
| ClientRecord |
A ClientRecord represents a running "worker" thread under control of the
hydra master controller.
|
| ClientRegionDescription |
Encodes information needed to describe and create a region.
|
| ClientRegionHelper |
Helps clients use
ClientRegionDescription. |
| ClientRegionPrms |
A class used to store keys for region configuration settings.
|
| ClientVmInfo |
This class provides objects used to describe client VMs.
|
| ClientVmMgr |
This class provides a public API that hydra clients can use to dynamically
stop or start client VMs during a test run.
|
| ClientVmRecord |
A ClientVmRecord represents a running VM under control of the hydra master
controller.
|
| ComplexConcurrentTaskScheduler |
This class acts as the task scheduler for scheduling TASKs onto clients
concurrently.
|
| ComplexRoundRobinTaskScheduler |
This class acts as the task scheduler for scheduling TASKs onto clients in
a round robin fashion (with respect to the logical hydra client thread
IDs).
|
| ComplexSerialTaskScheduler |
This class acts as the task scheduler for scheduling TASKs onto clients
sequentially in a random fashion.
|
| ComplexTaskScheduler |
This class acts as the superclass for all complex task schedulers.
|
| ConfigHashtable |
Manages a HashMap used for storing hydra configuration settings.
|
| ConfigLexer |
Lexes hydra config files.
|
| ConfigParser |
Parses hydra config files.
|
| ConfigPrms |
A class used to store keys for test configuration settings, and to provide
accessors for reading the keys so that they can be set as regular parameters
or as task attributes.
|
| DeadlockDetection | |
| DerbyServerHelper |
Supports hydra client access to the master-managed derby server.
|
| DerbyServerHelper.Endpoint |
Represents the endpoint for the derby server.
|
| DerbyServerMgr | |
| DiskStoreDescription |
Encodes information needed to describe and create a disk store.
|
| DiskStoreHelper |
Helps clients use
DiskStoreDescription. |
| DiskStorePrms |
A class used to store keys for disk store configuration settings.
|
| DistributedConnectionMgr |
A class used to manage the distributed connection for a VM.
|
| DistributedSystemBlackboard |
Holds a singleton instance per VM.
|
| DistributedSystemHelper |
Helps hydra clients manage locators for and connections to a distributed
system.
|
| DistributedSystemHelper.Endpoint |
Represents the endpoint for a locator.
|
| DynamicActionUtil |
This class provides support for
ClientVmMgr and RebootMgr. |
| DynamicConcurrentTaskScheduler | |
| DynamicSerialTaskScheduler | |
| EdgeBlackboard |
Holds a singleton instance per VM.
|
| EdgeHelper |
Provides support for edge clients running in hydra-managed client VMs.
|
| EnvHelper |
Computes hydra runtime environment default values.
|
| ExceptionThread |
A thread subclass whose instances contain results and exceptions obtained
during execution.
|
| Fcn |
Represents an arbitrary function suitable for passing to beanshell as
specified in a test configuration file.
|
| FileUtil | |
| FixedPartitionBlackboard |
Holds a singleton instance of each named blackboard per VM.
|
| FixedPartitionDescription |
Encodes information needed to describe and create a fixed partition.
|
| FixedPartitionHelper |
Helps datastores use
FixedPartitionDescription. |
| FixedPartitionPrms |
A class used to store keys for region configuration settings related to
fixed partitioning.
|
| GatewayDescription |
Encodes information needed to describe and create an gateway, as used by
bridge loaders, writers, and clients.
|
| GatewayHelper |
Provides support for gateways running in hydra-managed client VMs.
|
| GatewayHubBlackboard |
Holds a singleton instance per VM.
|
| GatewayHubDescription |
Encodes information needed to describe and create a gateway hub.
|
| GatewayHubHelper |
Provides support for gateway hubs running in hydra-managed client VMs.
|
| GatewayHubHelper.Endpoint |
Represents the endpoint for a gateway hub.
|
| GatewayHubPrms |
A class used to store keys for gateway hub configuration settings.
|
| GatewayHubVersionHelper |
Provides version-dependent support for
GatewayHubHelper. |
| GatewayPrms |
A class used to store keys for gateway and gateway queue configuration
settings.
|
| GatewayReceiverDescription |
Encodes information needed to describe and create a gateway receiver.
|
| GatewayReceiverHelper |
Provides support for gateway receivers running in hydra-managed client VMs.
|
| GatewayReceiverPrms |
A class used to store keys for gateway receiver configuration
settings.
|
| GatewaySenderDescription |
Encodes information needed to describe and create a gateway sender.
|
| GatewaySenderHelper |
Provides support for gateway senders running in hydra-managed client VMs.
|
| GatewaySenderPrms |
A class used to store keys for gateway sender configuration
settings.
|
| GemFireDescription |
Encodes information needed to manage a GemFire system.
|
| GemFireDistributionLocator |
GemFireDistributionLocator
|
| GemFireDistributionLocatorVersion |
Provides version-dependent support for
GemFireDistributionLocator. |
| GemFireLocatorAgent |
Instances of this class represent gemfire locator agents
started by master controller in hydra multiuser tests.
|
| GemFireLocatorAgentMgr |
Manages the gemfire locator agents.
|
| GemFireLocatorAgentRecord |
A GemFireLocatorAgentRecord represents a running "locatoragent" under control
of the hydra master controller.
|
| GemFirePrms |
A class used to store keys for GemFire configuration settings.
|
| GemFireVersionHelper |
Provides version-dependent support for
GemFireDescription. |
| GFMonMgr |
Manages the VM running GFMonMgr and WindowTester.
|
| GFMonPrms |
A class used to store keys for WindowTester/GFMon configuration settings.
|
| GsRandom |
This is a simple extension of java.util.Random that allows for the
generation of random numbers within ranges.
|
| HadoopDescription |
Encodes information about a hadoop cluster and the hosts it runs on.
|
| HadoopDescription.DataNodeDescription |
Represents a data node configuration for a given cluster and host.
|
| HadoopDescription.NameNodeDescription |
Represents a name node configuration for a given cluster and host.
|
| HadoopDescription.NodeDescription |
Represents a node configuration for a given cluster and host.
|
| HadoopDescription.NodeManagerDescription |
Represents a node manager configuration for a given cluster and host.
|
| HadoopDescription.ResourceManagerDescription |
Represents a resource manager configuration for a given cluster.
|
| HadoopHelper |
Helps hydra clients use
HadoopDescription to manage a hadoop cluster. |
| HadoopInfo |
A HadoopInfo represents a Hadoop process affected by a reboot action
through the
RebootMgr API. |
| HadoopMgr |
Manages the state of Hadoop processes started by hydra clients using the
HadoopHelper API. |
| HadoopPrms |
A class used to store keys for Hadoop cluster configuration settings.
|
| HadoopRecord |
A HadoopRecord represents a Hadoop process running in a hydra test.
|
| HDFSStoreDescription |
Encodes information needed to describe and create an HDFS store.
|
| HDFSStoreHelper |
Helps clients use
HDFSStoreDescription. |
| HDFSStorePrms |
A class used to store keys for HDFS store configuration settings.
|
| HostAgent |
Instances of this class represent remote host agents
for master controller in hydra multiuser tests.
|
| HostAgentDescription |
Encodes information needed to describe and start a hostagent process.
|
| HostAgentMgr |
Manages hostagents for master.
|
| HostAgentRecord |
A HostAgentRecord represents a running "hostagent" under control of
the hydra master controller.
|
| HostDescription |
Encodes information about a host.
|
| HostHelper |
Supports queries about hosts and their operating system types.
|
| HostPrms |
A class used to store keys for host configuration settings.
|
| HydraSubthread |
A thread subclass used by hydra clients to spawn a subthread of a
HydraThread that wraps and can respond as its RemoteTestModule. |
| HydraThread |
A thread subclass whose instances contain RemoteTestModules
representing hydra client threads.
|
| HydraThreadGroup |
A hydra thread group is used to carve out a fixed subset of the available
client thread pool for a task or set of tasks to use.
|
| HydraThreadGroupInfo |
A HydraThreadGroupInfo is used to pass threadgroup information to a new
client when it registers its existence.
|
| HydraThreadLocal |
This class provides
ThreadLocal variables for hydra
threads. |
| HydraThreadSubgroup |
A subgroup of a
HydraThreadGroup. |
| HydraVector | |
| HypericServerInstallDescription | |
| HypericServerInstallHelper |
Provides support for hyperic server installers running in hydra client VMs.
|
| HypericServerInstallPrms | |
| Java |
Instances of Java encode command line arguments and other info
needed for starting an instance of a java interpreter.
|
| JDKVersionDescription |
Encodes information used to configure hydra client JDK versions.
|
| JDKVersionPrms |
A class used to store keys for JDK version configuration settings.
|
| JMXManagerBlackboard |
Holds a singleton instance per JVM.
|
| JMXManagerHelper |
Helps hydra clients manage jmx managers.
|
| JMXManagerHelper.Endpoint |
Represents the endpoint for a JMX manager.
|
| JoinerThread |
A thread subclass whose instances contain ExceptionThreads.
|
| JProbeDescription |
Encodes information about a jprobe configuration.
|
| JProbePrms |
A class used to store keys for JProbe configuration settings.
|
| JUnitTestSuite |
A
JUnitTestSuite is a TestSuite that
can detect when tests are hung. |
| JUnitTestTask |
A
JUnitTestTask is a TestTask that
executes a number of JUnit TestCases. |
| JUnitTestTaskPrms |
A class used to store keys for Dunit's JUnitTestTask configuration settings.
|
| Log |
Manages a singleton instance of
LogWriter
to do all the logging for a VM. |
| MasterController |
This class acts as the master controller for hydra
tests.
|
| MasterDescription |
Encodes information about the hydra master controller.
|
| MasterProxy |
Implements the remote interface for client access to the master.
|
| MethExecutor |
A class specialized for executing (via reflection) the receiver/selector
pairs found in TestTasks.
|
| MethExecutorResult |
The result of a MethExecutor execute method.
|
| NetworkHelper |
Supports configuring network traffic between hosts.
|
| Nuker |
Supports cleaning up after hydra runs.
|
| NumStats |
Keeps a running min, max, and mean.
|
| NumVector |
A Vector subclass with methods for storing representations of ints,
longs, and doubles.
|
| OneOf |
Represents a random choice from within a set of discrete values.
|
| PartitionDescription |
Encodes information needed to describe and create a partition.
|
| PartitionPrms |
A class used to store keys for region configuration settings related to
partitioning.
|
| PermutationGenerator |
Systematically generates permutations.
|
| Platform |
This abstract class defines the methods required for platform-specific
operations.
|
| PoolDescription |
Encodes information needed to describe and create a pool as used by clients.
|
| PoolHelper |
Helps clients use
PoolDescription. |
| PoolPrms |
A class used to store keys for pool configuration settings.
|
| PortBlackboard |
Holds a singleton instance per VM.
|
| PortHelper |
This class provides support to hydra client for selecting ports.
|
| Prms |
A class used to store keys for hydra framework configuration settings.
|
| ProcessMgr |
This class provides support for managing processes.
|
| ProductVersionHelper | |
| Range |
Represents a random choice from within a range of values defined by the
extremes "upper" and "lower".
|
| RebootBlackboard |
Holds a singleton instance per JVM.
|
| RebootInfo |
This class returns objects that describe the hydra clients and hydra-managed
Hadoop processes running on a rebooted host.
|
| RebootMgr |
This class provides a public API that hydra clients can use to dynamically
reboot hosts during a test run.
|
| RebootPrms | |
| RebootUtil |
This class is used by the hydra master to reboot hosts.
|
| RegionDescription |
Encodes information needed to describe and create a region.
|
| RegionHelper |
Helps clients use
RegionDescription. |
| RegionPrms |
A class used to store keys for region configuration settings.
|
| RemoteTestModule |
Instances of this class represent remote clients
in hydra multiuser tests.
|
| ResourceManagerDescription |
Encodes information needed to describe and create a resource manager.
|
| ResourceManagerPrms |
A class used to store keys for cache configuration settings related to
resource management.
|
| ResourceOperation | |
| ResultLogger |
This class acts as a handy place for logging results to files.
|
| RMIHydraSocketFactory |
RMIHydraSocketFactory
has bigger backlog in ServerSocket and retries on Connection
refused.
|
| RmiRegistryHelper |
Helps create and access RMI registries.
|
| RobinG |
Represents a global round-robin choice from within a set of discrete values.
|
| SecurityDescription |
Encodes information needed to describe and create a security scheme.
|
| SecurityPrms |
A class used to store keys for configuration settings related to
security.
|
| SimpleConcurrentTaskScheduler | |
| SimpleSerialTaskScheduler |
This class acts as a serial task scheduler for INITTASKs.
|
| SimpleTaskScheduler |
This class acts as the superclass for all simple task schedulers.
|
| SSLDescription |
Encodes information needed to describe and create an SSL configuration.
|
| SSLPrms |
A class used to store keys for configuration settings related to SSL.
|
| StatMonitor |
Monitors the conditions in
StatMonitorPrms.conditions
and halts the test if one of the conditions is violated. |
| StatMonitorPrms |
A class used to store keys for
StatMonitor configuration
settings. |
| TestConfig |
A TestConfig contains the results of parsing a hydra configuration file.
|
| TestConfigComparison |
Used to compare test configuration files for test runs.
|
| TestConfigFcns |
Functions for use in test configuration files.
|
| TestFileUtil |
Supports runtime and postmortem operations on test files.
|
| TestTask |
A TestTask object represents a unit of work that can be transmitted
from a master controller to a client thread for execution.
|
| TestTaskResult |
A TestTaskResult represents the result of executing a test task, taking
into account the error status.
|
| UnitTestController |
This class acts as the controller for unit tests.
|
| UnixPlatform |
Supports UNIX commands.
|
| VecSorter | |
| VersionDescription |
Encodes information used to configure hydra client versions.
|
| VersionPrms |
A class used to store keys for version configuration settings.
|
| VmDescription |
Encodes information needed to describe and start a VM.
|
| VmPrms |
A class used to store keys for vm configuration settings.
|
| WindowsPlatform |
Supports Windows commands.
|
| Enum | Description |
|---|---|
| HadoopPrms.NodeType | |
| HostHelper.OSType |
Enumerates the legal values for
HostPrms.osTypes. |
| Exception | Description |
|---|---|
| ClientVmNotFoundException | |
| DynamicActionException | |
| HydraConfigException | |
| HydraInternalException | |
| HydraRuntimeException | |
| HydraTimeoutException | |
| HydraTypeException | |
| JUnitTestTimedOutException |
Thrown when a test takes too long to run.
|
| RebootHostNotFoundException | |
| SchedulingOrder |
Abstract class for clients giving scheduling instructions to the
hydra master.
|
| StopSchedulingOrder |
Throw this exception from a hydra task of type "TASK" to stop the master
from scheduling any more TASK work on any clients.
|
| StopSchedulingTaskOnClientOrder |
Throw this exception from a client to stop the master from scheduling the
task on the client henceforth.
|
| UnitTestController.UnitTestFailure |
OVERVIEW
Hydra is a master-client test framework that uses RMI for interprocess communication. It is written mostly in Java and invokes a few scripts and utilities.
Hydra is distributed, concurrent, and asynchronous. Tests can specify multiple resources and multi-threaded client processes and distribute them across multiple hosts and platforms. Tasks (units of work) are scheduled asynchronously. Tasks run concurrently on client threads by default, but a test can optionally be configured to run tasks sequentially.
Testing with hydra involves:
dunit. Examples of hydra tasks can be found in the TaskClient tryItOut methods, the client classes in hydra.samples, and throughout the test tree. Tasks are usually designed so that they can be used by many tests.
.conf files in hydra.samples, and throughout the test tree.
MasterController on a test configuration file. Suites of tests can be run via BatteryTest, which provides a layer on top of hydra. Hydra can also used to run tests in conjunction with the JUnit framework: smoketest for hydra smoke tests and dunit for distributed unit tests.
The below diagram shows the architecture of a Hydra test. A
configuration file controls the number of client VMs, the number of
Hydra threads in each client VM, and the hosts on which the VMs run.
At runtime, the hydra master controller parses the configuration file, configures and starts the required processes, schedules tasks on clients, monitors test progress, shuts down processes, and reports the outcome. More specifically, the master:
TestConfig.getInstance().
ClientNameTaskScheduler. The master terminates these VMs when the starttasks complete.
SimpleTaskScheduler and are typically used to initialize, on a per-VM and per-client-thread basis, any state needed for the main body of work to be carried out in the same VM by the tasks.
ComplexTaskScheduler. Tasks typically carry out the main body of work in a test. Their scheduler can be configured in great detail. For example, a task can be configured to run on particular client threads, at a particular interval, and with a particular priority. The scheduler continues scheduling the tasks over and over until a configurable termination condition is reached. Tasks can be configured to run for a certain amount of time, for a specified number of times, until an error condition is detected, and so forth.
SimpleTaskScheduler. They are typically used to validate results and summarize statistics, on a per-client-thread and per-VM basis, produced by the main body of work. The master shuts down these VMs when all closetasks complete.
ClientNameTaskScheduler. The master terminates these VMs when the endtasks complete.
During a test run, client processes report task results to the master. By default, the master will stop a test that has an error. If the error is a perceived hang, it will leave processes running so a debugger can be attached. Also, all test processes produce log output that can be monitored and analyzed. Test code can write to the logs as needed. The primary master log in a test run is Master_
In many cases, writing an effective hydra test is a matter of paying attention to just a small handful of items:
GETTING STARTED
Sample hydra environment for Solaris
Running hydra directly
To run an existing hydra test, first find a Running hydra via batterytest
To run an existing batterytest, first find a Running hydra smoketests
To run the existing hydra smoke tests, run TEST CONFIGURATION
The configuration file is the key element in defining and controlling a hydra run. A hydra config file can specify most of the details of a GemFire configuration as well as several different kinds of test properties and activities.
Include files
...discuss include files, tests/hydraconfig...
Configuring hydra tasks
See Configuring hydra thread groups
See Configuring hydra parameters
Hydra allows a test configuration file to specify values for parameters defined in any subclass of
Test packages can easily define additional parameter classes by subclassing Specifying parameters
Specify parameters in the hydra configuration file as
Individual tokens in a parameter value can sometimes be replaced with one of the special types:
Parameters can also expect a list of lists, where a comma separates each list. The following line, for example, sets
For more detail on syntax, see hydra_grammar.txt. For examples, see the hydra include and configuration files in the Overriding parameters
...discuss local.conf...
Accessing parameters at runtime
The hydra master controller postprocesses the result of parsing the test configuration file into a
If the parameter is a range or oneof type, and is read via ConfigHashtable methods, hydra will return a random value. For example, if the configuration file contains:
The master also postprocesses certain parameters into description
objects for the various test processes and stores them in the
Descriptions are used primarily by hydra internals and to log the postprocessed test configuration. Hydra makes commonly used information in the descriptions more directly available to clients via system properties and helper classes. For example, for a client thread to get its test directory, it can navigate descriptions like so:
As another example, suppose a client thread wanted to determine its actual host name. It could navigate its way through the TestConfig to the ClientDescription to the VmDescription to the HostDescription, but can more easily use LOGGING
Hydra automatically logs task assignments, results, etc.
Tests can do additional logging as needed. Hydra makes a singleton instance of
Logging is configured via
Each hydra process produces one or more log files. All log files for all test processes on all hosts go the test directory where master controller is running. Startup information for master and client VMs goes to its corresponding bgexec log. Additional information goes to the Master, taskmaster, and client vm logs. The process id is included in the log file name and can be used to match the bgexec and vm_ files for a process.
Watch Master_ ANALYZING TEST RESULTS
Hydra reports test errors in the file "errors.txt" in the test directory.
USING JPROBE WITH HYDRA
Attaching to a process
JProbe allows attaching to and monitoring a running process. To do this, turn on monitoring for the desired JProbe configuration in the test configuration file, for example:
For more information, see the rest of this document and the javadocs for the various classes.
GsRandom, OneOf, Range, Fcn, and system property variables ${property}.
setenv GEMFIRE path_to_gemfire_checkout/build-artifacts/product
setenv JAVA_HOME $GEMFIRE/jre;
setenv JTESTS $GEMFIRE/../tests/classes
setenv JPROBE /home/tools/jprobe40
setenv CLASSPATH $JTESTS
setenv LD_LIBRARY_PATH $GEMFIRE/lib:$GEMFIRE/../hidden/lib:$LD_LIBRARY_PATH
set path = (. $GEMFIRE/bin $JAVA_HOME/bin vsd/vsdtree/bin $path)
.conf file in the test tree. Then run hydra as described by MasterController.
.bt file in the test tree. Then run batterytest as described by BatteryTest.
build.sh run-smoke-tests.
TestTask.
HydraThreadGroup.
BasePrms on the classpath. The hydra package itself includes these parameter classes:
HostPrms to configure hosts. The operating system platform for each host is autogenerated by hydra.
VmPrms to configure VM environments, including the logical host name for each.
GemFirePrms to configure GemFire systems, including the logical host name for each.
Prms to configure the master controller. The VM environment for the master is autogenerated by hydra.
ClientPrms to configure clients, including the logical VM name and optional logical GemFire name for each.
LogPrms to configure logging for hydra processes. Logging for GemFire processes is configured through GemFirePrms.
JProbePrms to configure the JProbe performance and memory analysis tools.
BasePrms. See the javadocs for BasePrms for how to do this. Also see the javadoc'd and non-javadoc'd subclasses of BasePrms in the test tree for examples.
key = value;, where key is fully_qualified_class_name-parameter_name. See the javadocs for the parameter to determine the type of value required, how it defaults, etc.
For example:
hydra.Prms-totalTaskTimeSec = 60; // run the test for 60 seconds
hydra.ClientPrms-names = clientA clientB; // specifies two client types
hydra.ClientPrms-vmNames = vm; // logical vm name shared by both client types
// the vm must be configured elsewhere in the file
hydra.ClientPrms-vmQuantities = 1 2; // clientA has 1 VM and clientB has 2
hydra.ClientPrms-vmThreads = 1 10; // clientA has 1 thread per VM and clientB has 10
Range if the token is numerical, and OneOf or RobinG for just about anything. These types can also be nested. For example,
// produces random value between 1 and 10
myPackage.MyTestPrms-prm1 = RANGE 1 10 EGNAR;
// produces random value: true or false
myPackage.MyTestPrms-prm3 = ONEOF true false FOENO;
// produces global round robin values in this order: 1 2 3 4 5
myPackage.MyTestPrms-prm4 = ROBING 1 2 3 4 5 GNIBOR;
// produces random value: 0 or a random value between 100 and 200
myPackage.MyTestPrms-prm2 = ONEOF 0 RANGE 100 200 EGNAR FOENO;
numLists to be a three-element list of lists each of which has two elements:
mypackage.MyPrms-numLists = 1 2, 3 4, 5 6;
hydraconfig and hydra.samples packages and elsewhere in the test tree.
TestConfig object for use by the master and its clients. Hydra clients have access to configuration parameters at runtime via this TestConfig object. The parameters are stored in a ConfigHashtable, which provides convenience methods for accessing various types of parameter values. For example,
ConfigHashtable prms = TestConfig.getInstance().getParameters();
long totalTaskTimeSec = prms.longAt(Prms.totalTaskTimeSec);
myPackage.MyTestPrms-size = RANGE 1 10;
Then at runtime,
int size = prms.intAt(MyTestPrms.size); // returns random int between 1 and 10
object. The relationship (the "arrow" represents a
"has a" relationship) between these objects is:
HostDescription
^
___________|__________
| |
GemFireDescription VmDescription
^ ^ ^
________| ________| |________
| | |
MasterDescription
ClientDescription
String clientName = System.getProperty(ClientPrms.CLIENT_NAME_PROPERTY);
File sysDir = TestConfig.getInstance()
.getClientDescription(clientName)
.getVmDescription()
.getHostDescription()
.getTestDir();
But it can get this particular information more easily using:
String testDir = System.getProperty("JTESTS");
InetAddress.getLocalHost() or, even better, the convenience method HostHelper.getLocalHost().
LogWriter available to clients at runtime via the static method Log.getLogWriter(). Messages written to this logger appear in the normal client logs. Messages written to System.out and System.err appear in bgexec files.
LogPrms. GemFire system logging is configured via GemFirePrms.
hydra.JProbePrms-monitor = true;
hydra.JProbePrms-recordFromStart = false;
hydra.JProbePrms-finalSnapshot = false;
This causes hydra to start the VMs that use this JProbe configuration using a randomly generated port. JProbe causes the VM to hang on startup until the jpprofiler or jpmemorydebugger is used to attach. Watch the log file for the process for the connection message. For clients, this is the bgexec file. Look for the port on which the process is waiting. The port is also given in the taskmaster log file. Use the desired JProbe tool to attach to the process. Check the log to see that it has received the connection and proceeded.
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.