use of io.pravega.test.system.framework.services.Service in project pravega by pravega.
the class AbstractSystemTest method startPravegaControllerInstances.
static URI startPravegaControllerInstances(final URI zkUri, final int instanceCount) throws ExecutionException {
Service controllerService = Utils.createPravegaControllerService(zkUri);
if (!controllerService.isRunning()) {
controllerService.start(true);
}
Futures.getAndHandleExceptions(controllerService.scaleService(instanceCount), ExecutionException::new);
List<URI> conUris = controllerService.getServiceDetails();
log.info("Pravega Controller service details: {}", conUris);
// Fetch all the RPC endpoints and construct the client URIs.
final List<String> uris = conUris.stream().filter(ISGRPC).map(URI::getAuthority).collect(Collectors.toList());
URI controllerURI = URI.create((Utils.TLS_AND_AUTH_ENABLED ? TLS : TCP) + String.join(",", uris));
log.info("Controller Service direct URI: {}", controllerURI);
return controllerURI;
}
use of io.pravega.test.system.framework.services.Service in project pravega by pravega.
the class AbstractSystemTest method startBookkeeperInstances.
static void startBookkeeperInstances(final URI zkUri) {
Service bkService = Utils.createBookkeeperService(zkUri);
startBkService(bkService);
}
use of io.pravega.test.system.framework.services.Service in project pravega by pravega.
the class BookkeeperTest method initialize.
/**
* This is used to setup the various services required by the system test framework.
*
* @throws MarathonException if error in setup
*/
@Environment
public static void initialize() 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);
}
}
use of io.pravega.test.system.framework.services.Service in project pravega by pravega.
the class Utils method createPravegaSegmentStoreService.
public static Service createPravegaSegmentStoreService(final URI zkUri, final URI contUri) {
URI hdfsUri = null;
if (DOCKER_BASED) {
Service hdfsService = new HDFSDockerService("hdfs");
if (!hdfsService.isRunning()) {
hdfsService.start(true);
}
hdfsUri = hdfsService.getServiceDetails().get(0);
}
String serviceId = "segmentstore";
switch(EXECUTOR_TYPE) {
case REMOTE_SEQUENTIAL:
return new PravegaSegmentStoreService(serviceId, zkUri, contUri);
case DOCKER:
return new PravegaSegmentStoreDockerService(serviceId, zkUri, hdfsUri, contUri);
case KUBERNETES:
default:
return new PravegaSegmentStoreK8sService(serviceId, zkUri, getPravegaProperties());
}
}
use of io.pravega.test.system.framework.services.Service in project pravega by pravega.
the class AbstractFailoverTests method startBookkeeperInstances.
static void startBookkeeperInstances(final URI zkUri) throws ExecutionException {
Service bkService = Utils.createBookkeeperService(zkUri);
if (!bkService.isRunning()) {
bkService.start(true);
}
List<URI> bkUris = bkService.getServiceDetails();
log.debug("Bookkeeper service details: {}", bkUris);
}
Aggregations