use of com.hazelcast.simulator.coordinator.Coordinator in project hazelcast-simulator by hazelcast.
the class Runner method newCoordinator.
private Coordinator newCoordinator() {
CoordinatorParameters parameters = new CoordinatorParameters().setSkipShutdownHook(true).setSimulatorProperties(options.simulatorProperties);
if (options.sessionId != null) {
parameters.setSessionId(options.sessionId);
}
Registry registry;
if ("local".equals(options.simulatorProperties.getCloudProvider())) {
registry = new Registry();
registry.addAgent("localhost", "localhost");
} else {
registry = loadComponentRegister(new File("agents.txt"));
}
Coordinator coordinator = new Coordinator(registry, parameters);
try {
coordinator.start();
} catch (Exception e) {
// todo
throw new RuntimeException(e);
}
return coordinator;
}
use of com.hazelcast.simulator.coordinator.Coordinator in project hazelcast-simulator by hazelcast.
the class Runner method run.
public void run() throws Exception {
prepareClassPathForUploading();
Coordinator coordinator = newCoordinator();
try {
startMembers(coordinator);
startClients(coordinator);
TestSuite suite = newTestSuite();
coordinator.testRun(new RcTestRunOperation(suite));
} finally {
coordinator.close();
}
}
Aggregations