use of alluxio.hub.proto.AgentDetectPrestoResponse in project alluxio by Alluxio.
the class ManagerProcessContext method detectPresto.
private DetectPrestoResponse.Payload detectPresto(DetectPrestoRequest request) {
AgentDetectPrestoRequest detectRequest = AgentDetectPrestoRequest.newBuilder().setConfDir(request.getPayload().getConfDir()).build();
boolean workers = execOnHub(client -> client.detectPresto(detectRequest), AlluxioNodeType.WORKER).values().stream().map(AgentDetectPrestoResponse::getDetected).reduce(Boolean::logicalAnd).orElse(false);
boolean result = workers && execOnHub(client -> client.detectPresto(detectRequest), AlluxioNodeType.MASTER).values().stream().map(AgentDetectPrestoResponse::getDetected).reduce(Boolean::logicalAnd).orElse(false);
return DetectPrestoResponse.Payload.newBuilder().setDetected(result).build();
}
Aggregations