Search in sources :

Example 1 with SuppressClusterWarningsSuccess

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

the class SuppressClusterWarningsHandler method doAccept.

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

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 SuppressClusterWarningsFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.SuppressClusterWarningsFailed)1 SuppressClusterWarningsSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.SuppressClusterWarningsSuccess)1