Search in sources :

Example 1 with ClusterManagerConfigureKerberosSuccess

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

the class ClusterManagerConfigureKerberosHandler method doAccept.

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

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 ClusterManagerConfigureKerberosFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ClusterManagerConfigureKerberosFailed)1 ClusterManagerConfigureKerberosSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ClusterManagerConfigureKerberosSuccess)1 CloudbreakException (com.sequenceiq.cloudbreak.service.CloudbreakException)1