risdenk commented on a change in pull request #242: KNOX-2190 - Processing
advanced service discovery configuration on topology level
URL: https://github.com/apache/knox/pull/242#discussion_r369648025
##########
File path:
gateway-cm-integration/src/main/java/org/apache/knox/gateway/cm/descriptor/ClouderaManagerDescriptorParser.java
##########
@@ -121,9 +139,9 @@ private SimpleDescriptor parseXmlDescriptor(String name,
String xmlValue) {
break;
}
}
- if
(advancedServiceDiscoveryConfig.getExpectedTopologyNames().contains(name)) {
- setDiscoveryDetails(descriptor);
- addEnabledServices(descriptor);
+ if (advancedServiceDiscoveryConfigMap.containsKey(name)) {
+ setDiscoveryDetails(descriptor,
advancedServiceDiscoveryConfigMap.get(name));
+ addEnabledServices(descriptor,
advancedServiceDiscoveryConfigMap.get(name));
Review comment:
Nit: You could pull the name out as a variable and check if its null or not
to avoid multiple map lookups.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services