use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariSuccess in project cloudbreak by hortonworks.
the class StartAmbariHandler method accept.
@Override
public void accept(Event<StartAmbariRequest> event) {
Long stackId = event.getData().getStackId();
Selectable response;
try {
ambariClusterCreationService.startAmbari(stackId);
response = new StartAmbariSuccess(stackId);
} catch (Exception e) {
response = new StartAmbariFailed(stackId, e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariSuccess in project cloudbreak by hortonworks.
the class ResetFlowEventChainFactory method createFlowTriggerEventQueue.
@Override
public Queue<Selectable> createFlowTriggerEventQueue(StackEvent event) {
Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
flowEventChain.add(new StackEvent(CLUSTER_RESET_EVENT.event(), event.getStackId(), event.accepted()));
flowEventChain.add(new StartAmbariSuccess(CLUSTER_INSTALL_EVENT.event(), event.getStackId()));
return flowEventChain;
}
Aggregations