Search in sources :

Example 1 with PillarConfigUpdateFailed

use of com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateFailed 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)

Example 2 with PillarConfigUpdateFailed

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

the class ClusterStartPillarConfigUpdateHandler method doAccept.

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

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)2 PillarConfigUpdateFailed (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateFailed)2 PillarConfigUpdateRequest (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateRequest)1 PillarConfigUpdateSuccess (com.sequenceiq.cloudbreak.core.flow2.cluster.config.update.event.PillarConfigUpdateSuccess)1 ClusterStartPillarConfigUpdateRequest (com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateRequest)1 ClusterStartPillarConfigUpdateResult (com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateResult)1