Package com.sequenceiq.cloudbreak.service.stack.event

Examples of com.sequenceiq.cloudbreak.service.stack.event.StackCreationSuccess


            if (pollingAttempt >= MAX_POLLING_ATTEMPTS) {
                throw new AmbariHostsUnavailableException(String.format("Operation timed out. Failed to start Ambari server in %s seconds.",
                        MAX_POLLING_ATTEMPTS * POLLING_INTERVAL / MS_PER_SEC));
            }
            LOGGER.info("Publishing {} event.", ReactorConfig.STACK_CREATE_SUCCESS_EVENT);
            reactor.notify(ReactorConfig.STACK_CREATE_SUCCESS_EVENT, Event.wrap(new StackCreationSuccess(stackId, ambariIp)));
        } catch (Exception e) {
            LOGGER.error("Unhandled exception occured while trying to reach initializing Ambari server.", e);
            LOGGER.info("Publishing {} event.", ReactorConfig.STACK_CREATE_FAILED_EVENT);
            StackOperationFailure stackCreationFailure = new StackOperationFailure(stackId,
                    "Unhandled exception occured while trying to reach initializing Ambari server.");
View Full Code Here


        verify(websocketService, times(1)).sendToTopicUser(anyString(), any(WebsocketEndPoint.class), any());
        verify(reactor, times(1)).notify(any(ReactorConfig.class), any(Event.class));
    }

    private Event<StackCreationSuccess> createEvent() {
        StackCreationSuccess data = new StackCreationSuccess(1L, DETAILED_MESSAGE);
        return new Event<StackCreationSuccess>(data);
    }
View Full Code Here

    @Autowired
    private Reactor reactor;

    @Override
    public void accept(Event<StackCreationSuccess> event) {
        StackCreationSuccess stackCreationSuccess = event.getData();
        Long stackId = stackCreationSuccess.getStackId();
        String ambariIp = stackCreationSuccess.getAmbariIp();
        Stack stack = stackUpdater.updateAmbariIp(stackId, ambariIp);
        MDCBuilder.buildMdcContext(stack);
        LOGGER.info("Accepted {} event.", ReactorConfig.STACK_CREATE_SUCCESS_EVENT, stackId);
        stack = stackUpdater.updateStackStatus(stackId, Status.AVAILABLE);
        websocketService.sendToTopicUser(stack.getOwner(), WebsocketEndPoint.STACK,
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.service.stack.event.StackCreationSuccess

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.