use of com.yahoo.system.ProcessExecuter in project vespa by vespa-engine.
the class RankSetupValidator method execValidate.
private boolean execValidate(String configId, SearchCluster sc, String sdName, DeployLogger deployLogger) {
String job = "vespa-verify-ranksetup-bin " + configId;
ProcessExecuter executer = new ProcessExecuter();
try {
Pair<Integer, String> ret = executer.exec(job);
if (ret.getFirst() != 0) {
validateFail(ret.getSecond(), sc, sdName, deployLogger);
}
} catch (IOException e) {
validateWarn(e, deployLogger);
return false;
}
return true;
}
use of com.yahoo.system.ProcessExecuter in project vespa by vespa-engine.
the class DockerAdminComponent method createNodeAdminStateUpdater.
private NodeAdminStateUpdaterImpl createNodeAdminStateUpdater() {
if (!environment.isPresent()) {
environment = Optional.of(new Environment(configServerConfig));
}
Clock clock = Clock.systemUTC();
String dockerHostHostName = environment.get().getParentHostHostname();
ProcessExecuter processExecuter = new ProcessExecuter();
docker.start();
DockerOperations dockerOperations = new DockerOperationsImpl(docker, environment.get(), processExecuter, new IPAddressesImpl());
StorageMaintainer storageMaintainer = new StorageMaintainer(dockerOperations, processExecuter, metricReceiver, environment.get(), clock);
AclMaintainer aclMaintainer = new AclMaintainer(dockerOperations, configServerClients.nodeRepository(), dockerHostHostName);
Function<String, NodeAgent> nodeAgentFactory = (hostName) -> new NodeAgentImpl(hostName, configServerClients.nodeRepository(), configServerClients.orchestrator(), dockerOperations, storageMaintainer, aclMaintainer, environment.get(), clock, NODE_AGENT_SCAN_INTERVAL);
NodeAdmin nodeAdmin = new NodeAdminImpl(dockerOperations, nodeAgentFactory, storageMaintainer, aclMaintainer, metricReceiver, clock);
return new NodeAdminStateUpdaterImpl(configServerClients.nodeRepository(), configServerClients.orchestrator(), storageMaintainer, nodeAdmin, dockerHostHostName, clock, NODE_ADMIN_CONVERGE_STATE_INTERVAL, classLocking);
}
Aggregations