Package com.sequenceiq.cloudbreak.service.cluster.event

Examples of com.sequenceiq.cloudbreak.service.cluster.event.UpdateAmbariHostsRequest


    @Autowired
    private StackRepository stackRepository;

    @Override
    public void accept(Event<UpdateAmbariHostsRequest> event) {
        UpdateAmbariHostsRequest request = event.getData();
        Stack stack = stackRepository.findById(request.getStackId());
        MDCBuilder.buildMdcContext(stack);
        LOGGER.info("Accepted {} event.", ReactorConfig.UPDATE_AMBARI_HOSTS_REQUEST_EVENT);
        if (request.isDecommision()) {
            ambariClusterConnector.decommisionAmbariNodes(request.getStackId(), request.getHosts());
        } else {
            ambariClusterConnector.installAmbariNode(request.getStackId(), request.getHosts());
        }
    }
View Full Code Here


        MDCBuilder.buildMdcContext(stack.getCluster());
        boolean decommisionRequest = validateRequest(stack, hostGroupAdjustments);
        LOGGER.info("Cluster update requested [BlueprintId: {}]", stack.getCluster().getBlueprint().getId());
        LOGGER.info("Publishing {} event", ReactorConfig.UPDATE_AMBARI_HOSTS_REQUEST_EVENT);
        reactor.notify(ReactorConfig.UPDATE_AMBARI_HOSTS_REQUEST_EVENT, Event.wrap(
                new UpdateAmbariHostsRequest(stackId, hostGroupAdjustments, decommisionRequest)));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.service.cluster.event.UpdateAmbariHostsRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.