|
@@ -210,9 +210,9 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
|
|
|
|
|
|
|
|
|
def getHostWithComponent(self, serviceName, componentName, services, hosts):
|
|
|
- if services is not None and hosts is not None:
|
|
|
+ if services is not None and hosts is not None and serviceName in [service["StackServices"]["service_name"] for service in services["services"]]:
|
|
|
service = [serviceEntry for serviceEntry in services["services"] if serviceEntry["StackServices"]["service_name"] == serviceName][0]
|
|
|
- components = [componentEntry for componentEntry in service["components"] if componentEntry["StackServiceComponents"]["component_name"] == "NODEMANAGER"]
|
|
|
+ components = [componentEntry for componentEntry in service["components"] if componentEntry["StackServiceComponents"]["component_name"] == componentName]
|
|
|
if (len(components) > 0 and len(components[0]["StackServiceComponents"]["hostnames"]) > 0):
|
|
|
# NodeManager available - determine hosts and memory
|
|
|
componentHostname = components[0]["StackServiceComponents"]["hostnames"][0]
|