Search in sources :

Example 1 with WaitForClusterManagerSuccess

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

the class WaitClusterManagerHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<WaitForClusterManagerRequest> event) {
    Long stackId = event.getData().getResourceId();
    Selectable response;
    try {
        clusterBuilderService.waitForClusterManager(stackId);
        response = new WaitForClusterManagerSuccess(stackId);
    } catch (RuntimeException | ClusterClientInitException | CloudbreakException e) {
        LOGGER.error("WaitClusterManagerHandler step failed with the following message: {}", e.getMessage());
        response = new WaitForClusterManagerFailed(stackId, e);
    }
    return response;
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) WaitForClusterManagerSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.WaitForClusterManagerSuccess) ClusterClientInitException(com.sequenceiq.cloudbreak.cluster.service.ClusterClientInitException) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) WaitForClusterManagerFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.WaitForClusterManagerFailed)

Aggregations

ClusterClientInitException (com.sequenceiq.cloudbreak.cluster.service.ClusterClientInitException)1 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 WaitForClusterManagerFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.WaitForClusterManagerFailed)1 WaitForClusterManagerSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.WaitForClusterManagerSuccess)1 CloudbreakException (com.sequenceiq.cloudbreak.service.CloudbreakException)1