String serviceName = definedCompInfo.getServiceName();
if (!serviceNames.contains(serviceName)) {
logger.info("Service " + serviceName + " is removed from Ambari, igonre component " + componentName);
continue;
}
ApiHostComponent component = new ApiHostComponent();
hostComponents.add(component);
ApiComponentInfo componentInfo = new ApiComponentInfo();
componentInfo.setComponentName(componentName);
component.setHostComponent(componentInfo);
}
return apiHostComponents;
}