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

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


    @Autowired
    private StackRepository stackRepository;

    @Override
    public void accept(Event<MetadataSetupComplete> event) {
        MetadataSetupComplete metadataSetupComplete = event.getData();
        Long stackId = metadataSetupComplete.getStackId();
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        Set<CoreInstanceMetaData> coreInstanceMetaData = metadataSetupComplete.getCoreInstanceMetaData();
        LOGGER.info("Accepted {} event.", ReactorConfig.METADATA_SETUP_COMPLETE_EVENT, stackId);
        ambariRoleAllocator.allocateRoles(stackId, coreInstanceMetaData);
    }
View Full Code Here


        List<Resource> resourcesByType = stack.getResourcesByType(ResourceType.GCC_INSTANCE);
        GccTemplate template = (GccTemplate) stack.getTemplate();
        instanceMetaDatas = collectMetaData(stack, template, resourcesByType);
        LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.METADATA_SETUP_COMPLETE_EVENT, stack.getId());
        reactor.notify(ReactorConfig.METADATA_SETUP_COMPLETE_EVENT,
                Event.wrap(new MetadataSetupComplete(CloudPlatform.GCC, stack.getId(), instanceMetaDatas)));
    }
View Full Code Here

        String filePath = AzureCertificateService.getUserJksFileName(azureCredential, azureStackUtil.emailAsFolder(stack.getOwner()));
        AzureClient azureClient = azureStackUtil.createAzureClient(azureCredential, filePath);
        Set<CoreInstanceMetaData> instanceMetaDatas = collectMetaData(stack, azureClient);
        LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.METADATA_SETUP_COMPLETE_EVENT, stack.getId());
        reactor.notify(ReactorConfig.METADATA_SETUP_COMPLETE_EVENT,
                Event.wrap(new MetadataSetupComplete(CloudPlatform.AZURE, stack.getId(), instanceMetaDatas)));
    }
View Full Code Here

            }
        }

        LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.METADATA_SETUP_COMPLETE_EVENT, stack.getId());
        reactor.notify(ReactorConfig.METADATA_SETUP_COMPLETE_EVENT,
                Event.wrap(new MetadataSetupComplete(CloudPlatform.AWS, stack.getId(), coreInstanceMetadata)));
    }
View Full Code Here

        verify(ambariRoleAllocator, times(1)).allocateRoles(anyLong(), anySetOf(CoreInstanceMetaData.class));
    }

    private Event<MetadataSetupComplete> createEvent() {
        return new Event<MetadataSetupComplete>(
                new MetadataSetupComplete(CloudPlatform.AZURE, 1L, new HashSet<CoreInstanceMetaData>()));
    }
View Full Code Here

TOP

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

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.