use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartRequest in project cloudbreak by hortonworks.
the class ClusterStartHandler method accept.
@Override
public void accept(Event<ClusterStartRequest> event) {
ClusterStartRequest request = event.getData();
ClusterStartResult result;
try {
Stack stack = stackService.getByIdWithLists(request.getStackId());
int requestId = ambariClusterConnector.startCluster(stack);
result = new ClusterStartResult(request, requestId);
} catch (Exception e) {
result = new ClusterStartResult(e.getMessage(), e, request);
}
eventBus.notify(result.selector(), new Event<>(event.getHeaders(), result));
}
Aggregations