Search in sources :

Example 16 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class ReadWriteAndScaleWithFailoverTest method initialize.

@Environment
public static void initialize() throws MarathonException, ExecutionException {
    URI zkUri = startZookeeperInstance();
    startBookkeeperInstances(zkUri);
    URI controllerUri = startPravegaControllerInstances(zkUri);
    startPravegaSegmentStoreInstances(zkUri, controllerUri);
}
Also used : URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Example 17 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class ReaderCheckpointTest method initialize.

@Environment
public static void initialize() {
    // 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 segment store details: {}", segService.getServiceDetails());
}
Also used : Service(io.pravega.test.system.framework.services.Service) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Example 18 with Environment

use of io.pravega.test.system.framework.Environment in project pravega by pravega.

the class RetentionTest method initialize.

/**
 * This is used to setup the various services required by the system test framework.
 *
 * @throws MarathonException    when error in setup
 */
@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.debug("Zookeeper service details: {}", zkUris);
    // get the zk ip details and pass it to bk, host, controller
    URI zkUri = zkUris.get(0);
    // 2, check if bk is running, otherwise start, get the zk ip
    Service bkService = Utils.createBookkeeperService(zkUri);
    if (!bkService.isRunning()) {
        bkService.start(true);
    }
    List<URI> bkUris = bkService.getServiceDetails();
    log.debug("Bookkeeper service details: {}", bkUris);
    // 3. start controller
    Service conService = Utils.createPravegaControllerService(zkUri);
    if (!conService.isRunning()) {
        conService.start(true);
    }
    List<URI> conUris = conService.getServiceDetails();
    log.debug("Pravega controller service details: {}", conUris);
    // 4.start segmentstore
    Service segService = Utils.createPravegaSegmentStoreService(zkUri, conUris.get(0));
    if (!segService.isRunning()) {
        segService.start(true);
    }
    List<URI> segUris = segService.getServiceDetails();
    log.debug("Pravega segmentstore service details: {}", segUris);
}
Also used : Service(io.pravega.test.system.framework.services.Service) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) URI(java.net.URI) Environment(io.pravega.test.system.framework.Environment)

Aggregations

Environment (io.pravega.test.system.framework.Environment)18 URI (java.net.URI)15 Service (io.pravega.test.system.framework.services.Service)12 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)6 ExecutionException (java.util.concurrent.ExecutionException)2