@Autowired
private StackRepository stackRepository;
@Override
public void accept(Event<MetadataUpdateComplete> event) {
MetadataUpdateComplete data = event.getData();
Long stackId = data.getStackId();
Set<CoreInstanceMetaData> coreInstanceMetaData = data.getCoreInstanceMetaData();
Stack stack = stackRepository.findById(stackId);
MDCBuilder.buildMdcContext(stack);
LOGGER.info("Accepted {} event.", ReactorConfig.METADATA_UPDATE_COMPLETE_EVENT, stackId);
ambariRoleAllocator.updateInstanceMetadata(stackId, coreInstanceMetaData);
}