Search in sources :

Example 1 with PillarConfigUpdateSuccess

use of com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateSuccess in project cloudbreak by hortonworks.

the class PillarConfigUpdateHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<PillarConfigUpdateRequest> event) {
    PillarConfigUpdateRequest request = event.getData();
    Selectable response;
    try {
        pillarConfigUpdateService.doConfigUpdate(request.getResourceId());
        response = new PillarConfigUpdateSuccess(request.getResourceId());
    } catch (Exception e) {
        LOGGER.warn("Pillar configuration update failed.", e);
        response = new PillarConfigUpdateFailed(request.getResourceId(), e);
    }
    return response;
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) PillarConfigUpdateRequest(com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateRequest) PillarConfigUpdateFailed(com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateFailed) PillarConfigUpdateSuccess(com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateSuccess)

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 PillarConfigUpdateFailed (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateFailed)1 PillarConfigUpdateRequest (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateRequest)1 PillarConfigUpdateSuccess (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateSuccess)1