use of com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesResult in project cloudbreak by hortonworks.
the class ClusterUpscaleActions method configureKeytabsAction.
@Bean(name = "RECONFIGURE_KEYTABS_STATE")
public Action<?, ?> configureKeytabsAction() {
return new AbstractClusterUpscaleAction<>(UploadUpscaleRecipesResult.class) {
@Override
protected void doExecute(ClusterUpscaleContext context, UploadUpscaleRecipesResult payload, Map<Object, Object> variables) {
if (context.isSinglePrimaryGateway() && ClusterManagerType.CLOUDERA_MANAGER.equals(context.getClusterManagerType())) {
KeytabConfigurationRequest keytabConfigurationRequest = new KeytabConfigurationRequest(context.getStackId());
sendEvent(context, keytabConfigurationRequest.selector(), keytabConfigurationRequest);
} else {
KeytabConfigurationSuccess keytabConfigurationSuccess = new KeytabConfigurationSuccess(context.getStackId());
sendEvent(context, keytabConfigurationSuccess.selector(), keytabConfigurationSuccess);
}
}
};
}
use of com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesResult in project cloudbreak by hortonworks.
the class UploadUpscaleRecipesHandler method accept.
@Override
public void accept(Event<UploadUpscaleRecipesRequest> event) {
UploadUpscaleRecipesRequest request = event.getData();
UploadUpscaleRecipesResult result;
try {
// TODO: because of CB-17116 - step removed - cleanup the code
result = new UploadUpscaleRecipesResult(request);
} catch (Exception e) {
result = new UploadUpscaleRecipesResult(e.getMessage(), e, request);
}
eventBus.notify(result.selector(), new Event<>(event.getHeaders(), result));
}
Aggregations