You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2020/04/26 02:34:08 UTC

[GitHub] [knox] pzampino commented on a change in pull request #326: KNOX-2357 - Descriptor handler should not default discovery type to A…

pzampino commented on a change in pull request #326:
URL: https://github.com/apache/knox/pull/326#discussion_r415194680



##########
File path: gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
##########
@@ -195,6 +200,47 @@
                                 gws);
     }
 
+    /**
+     * Determine whether discovery should be performed for the specified descriptor.
+     *
+     * @param desc A SimpleDescriptor
+     * @return true, if discovery should be performed for the descriptor; Otherwise, false.
+     */
+    private static boolean shouldPerformDiscovery(final SimpleDescriptor desc) {
+
+        // If there is a discovery type specified, then discovery should be performed
+        final String discoveryType = desc.getDiscoveryType();
+        if (discoveryType != null && !discoveryType.isEmpty()) {

Review comment:
       Discovery type has been optional since the beginning, and defaults to Ambari when omitted. I didn't want to break this by adding a requirement that discovery type be specified. What I'm saying here is that any discovery-related properties in a descriptor signal that discovery is expected, and the rest carries on as it has prior to this change.




----------------------------------------------------------------
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:
users@infra.apache.org