@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);
}