Search in sources :

Example 1 with InstallClusterFailed

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.InstallClusterFailed in project cloudbreak by hortonworks.

the class InstallClusterHandler method accept.

@Override
public void accept(Event<InstallClusterRequest> event) {
    Long stackId = event.getData().getStackId();
    Selectable response;
    try {
        ambariClusterCreationService.buildAmbariCluster(stackId);
        response = new InstallClusterSuccess(stackId);
    } catch (RuntimeException e) {
        response = new InstallClusterFailed(stackId, e);
    }
    eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Also used : InstallClusterFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.InstallClusterFailed) Selectable(com.sequenceiq.cloudbreak.cloud.event.Selectable) InstallClusterSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.InstallClusterSuccess)

Aggregations

Selectable (com.sequenceiq.cloudbreak.cloud.event.Selectable)1 InstallClusterFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.InstallClusterFailed)1 InstallClusterSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.InstallClusterSuccess)1