use of io.pravega.test.system.framework.Environment in project pravega by pravega.
the class MultiSegmentStoreTest method initialize.
@Environment
public static void initialize() throws MarathonException {
// 1. Check if zk is running, if not start it.
Service zkService = Utils.createZookeeperService();
if (!zkService.isRunning()) {
zkService.start(true);
}
List<URI> zkUris = zkService.getServiceDetails();
log.info("zookeeper service details: {}", zkUris);
URI zkUri = zkUris.get(0);
// 2. Check if bk is running, otherwise start it.
Service bkService = Utils.createBookkeeperService(zkUri);
if (!bkService.isRunning()) {
bkService.start(true);
}
List<URI> bkUris = bkService.getServiceDetails();
log.info("bookkeeper service details: {}", bkUris);
// 3. Start controller.
Service controllerService = Utils.createPravegaControllerService(zkUri);
if (!controllerService.isRunning()) {
controllerService.start(true);
}
List<URI> conUris = controllerService.getServiceDetails();
log.info("Pravega Controller service instance details: {}", conUris);
// 4. Start segment store.
Service segService = Utils.createPravegaSegmentStoreService(zkUri, conUris.get(0));
if (!segService.isRunning()) {
segService.start(true);
}
List<URI> segUris = segService.getServiceDetails();
log.info("pravega host service details: {}", segUris);
}
use of io.pravega.test.system.framework.Environment in project pravega by pravega.
the class PravegaControllerTest method setup.
/**
* This is used to setup the various services required by the system test framework.
*
* @throws MarathonException if error in setup
*/
@Environment
public static void setup() throws MarathonException {
Service zk = Utils.createZookeeperService();
if (!zk.isRunning()) {
zk.start(true);
}
Service con = Utils.createPravegaControllerService(zk.getServiceDetails().get(0));
if (!con.isRunning()) {
con.start(true);
}
}
use of io.pravega.test.system.framework.Environment in project pravega by pravega.
the class ReadWithAutoScaleTest method setup.
@Environment
public static void setup() {
// 1. check if zk is running, if not start it
Service zkService = Utils.createZookeeperService();
if (!zkService.isRunning()) {
zkService.start(true);
}
List<URI> zkUris = zkService.getServiceDetails();
log.debug("Zookeeper service details: {}", zkUris);
// get the zk ip details and pass it to bk, host, controller
// 2, check if bk is running, otherwise start, get the zk ip
Service bkService = Utils.createBookkeeperService(zkUris.get(0));
if (!bkService.isRunning()) {
bkService.start(true);
}
log.debug("Bookkeeper service details: {}", bkService.getServiceDetails());
// 3. start controller
Service conService = Utils.createPravegaControllerService(zkUris.get(0));
if (!conService.isRunning()) {
conService.start(true);
}
List<URI> conUris = conService.getServiceDetails();
log.debug("Pravega Controller service details: {}", conUris);
// 4.start host
Service segService = Utils.createPravegaSegmentStoreService(zkUris.get(0), conUris.get(0));
if (!segService.isRunning()) {
segService.start(true);
}
log.debug("Pravega host service details: {}", segService.getServiceDetails());
}
use of io.pravega.test.system.framework.Environment in project pravega by pravega.
the class ReadWriteAndAutoScaleWithFailoverTest method initialize.
@Environment
public static void initialize() throws MarathonException, ExecutionException {
URI zkUri = startZookeeperInstance();
startBookkeeperInstances(zkUri);
URI controllerUri = startPravegaControllerInstances(zkUri);
startPravegaSegmentStoreInstances(zkUri, controllerUri);
}
use of io.pravega.test.system.framework.Environment in project pravega by pravega.
the class BookkeeperTest method setup.
/**
* This is used to setup the various services required by the system test framework.
*
* @throws MarathonException if error in setup
*/
@Environment
public static void setup() throws MarathonException {
Service zk = Utils.createZookeeperService();
if (!zk.isRunning()) {
zk.start(true);
}
Service bk = Utils.createBookkeeperService(zk.getServiceDetails().get(0));
if (!bk.isRunning()) {
bk.start(true);
}
}
Aggregations