Search in sources :

Example 1 with UpdateClusterConfigSuccess

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

the class UpdateClusterConfigHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<UpdateClusterConfigRequest> event) {
    Long stackId = event.getData().getResourceId();
    Selectable response;
    try {
        clusterBuilderService.updateConfig(stackId);
        response = new UpdateClusterConfigSuccess(stackId);
    } catch (RuntimeException e) {
        LOGGER.error("UpdateClusterConfigHandler step failed with the following message: {}", e.getMessage());
        response = new UpdateClusterConfigFailed(stackId, e);
    }
    return response;
}
Also used : UpdateClusterConfigFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.UpdateClusterConfigFailed) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) UpdateClusterConfigSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.UpdateClusterConfigSuccess)

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 UpdateClusterConfigFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.UpdateClusterConfigFailed)1 UpdateClusterConfigSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.UpdateClusterConfigSuccess)1