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

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


    @Autowired
    private AmbariClusterInstallerMailSenderService ambariClusterInstallerMailSenderService;

    @Override
    public void accept(Event<ClusterCreationSuccess> event) {
        ClusterCreationSuccess clusterCreationSuccess = event.getData();
        Long clusterId = clusterCreationSuccess.getClusterId();
        Cluster cluster = clusterRepository.findById(clusterId);
        MDCBuilder.buildMdcContext(cluster);
        LOGGER.info("Accepted {} event.", ReactorConfig.CLUSTER_CREATE_SUCCESS_EVENT, clusterId);
        cluster.setStatus(Status.AVAILABLE);
        cluster.setStatusReason("");
        cluster.setCreationFinished(clusterCreationSuccess.getCreationFinished());
        clusterRepository.save(cluster);
        Stack stack = stackRepository.findStackWithListsForCluster(clusterId);
        Set<InstanceMetaData> instances = stack.getInstanceMetaData();
        for (InstanceMetaData instanceMetaData : instances) {
            instanceMetaData.setRemovable(false);
View Full Code Here


    @Before
    public void setUp() {
        underTest = new ClusterCreationSuccessHandler();
        MockitoAnnotations.initMocks(this);
        clusterCreationSuccess = new ClusterCreationSuccess(1L, 20L, "1.1.1.1");
        event = new Event<>(clusterCreationSuccess);
        cluster = new Cluster();
        cluster.setEmailNeeded(false);
        stack = new Stack();
        Set<InstanceMetaData> instanceMetaData = new HashSet<>();
View Full Code Here

    }

    private void clusterCreateSuccess(Cluster cluster, long creationFinished, String ambariIp) {
        MDCBuilder.buildMdcContext(cluster);
        LOGGER.info("Publishing {} event", ReactorConfig.CLUSTER_CREATE_SUCCESS_EVENT);
        reactor.notify(ReactorConfig.CLUSTER_CREATE_SUCCESS_EVENT, Event.wrap(new ClusterCreationSuccess(cluster.getId(), creationFinished, ambariIp)));
    }
View Full Code Here

TOP

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

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.