use of com.sequenceiq.cloudbreak.reactor.api.event.resource.BootstrapNewNodesRequest in project cloudbreak by hortonworks.
the class BootstrapNewNodesHandler method accept.
@Override
public void accept(Event<BootstrapNewNodesRequest> event) {
BootstrapNewNodesRequest request = event.getData();
BootstrapNewNodesResult result;
try {
clusterBootstrapper.bootstrapNewNodes(request.getStackId(), request.getUpscaleCandidateAddresses(), request.getHostNames());
result = new BootstrapNewNodesResult(request);
} catch (Exception e) {
result = new BootstrapNewNodesResult(e.getMessage(), e, request);
}
eventBus.notify(result.selector(), new Event<>(event.getHeaders(), result));
}
use of com.sequenceiq.cloudbreak.reactor.api.event.resource.BootstrapNewNodesRequest in project cloudbreak by hortonworks.
the class StackUpscaleActions method bootstrapNewNodes.
@Bean(name = "BOOTSTRAP_NEW_NODES_STATE")
public Action<?, ?> bootstrapNewNodes() {
return new AbstractStackUpscaleAction<BootstrapNewNodesEvent>(BootstrapNewNodesEvent.class) {
@Override
protected void doExecute(StackScalingFlowContext context, BootstrapNewNodesEvent payload, Map<Object, Object> variables) {
stackUpscaleService.bootstrappingNewNodes(context.getStack());
Selectable request = new BootstrapNewNodesRequest(context.getStack().getId(), payload.getUpscaleCandidateAddresses(), context.getHostNames());
sendEvent(context.getFlowId(), request);
}
};
}
Aggregations