use of com.sequenceiq.cloudbreak.core.flow2.stack.provision.DisableKerberosResultToStackEventConverter in project cloudbreak by hortonworks.
the class ClusterTerminationActions method terminatingCluster.
@Bean(name = "CLUSTER_TERMINATING_STATE")
public Action<?, ?> terminatingCluster() {
return new AbstractClusterAction<StackEvent>(StackEvent.class) {
@Override
protected void doExecute(ClusterViewContext context, StackEvent payload, Map<Object, Object> variables) {
clusterTerminationFlowService.terminateCluster(context);
sendEvent(context);
}
@Override
protected void initPayloadConverterMap(List<PayloadConverter<StackEvent>> payloadConverters) {
payloadConverters.add(new DisableKerberosResultToStackEventConverter());
}
@Override
protected Selectable createRequest(ClusterViewContext context) {
return new ClusterTerminationRequest(context.getStackId(), context.getClusterView() != null ? context.getClusterView().getId() : null);
}
};
}
Aggregations