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