[
https://issues.apache.org/jira/browse/KNOX-2357?focusedWorklogId=427272&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-427272
]
ASF GitHub Bot logged work on KNOX-2357:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Apr/20 02:34
Start Date: 26/Apr/20 02:34
Worklog Time Spent: 10m
Work Description: 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 427272)
Time Spent: 0.5h (was: 20m)
> Descriptor handler should not default discovery type to Ambari unless there
> is discovery configuration
> ------------------------------------------------------------------------------------------------------
>
> Key: KNOX-2357
> URL: https://issues.apache.org/jira/browse/KNOX-2357
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.4.0
> Reporter: Philip Zampino
> Assignee: Philip Zampino
> Priority: Major
> Fix For: 1.5.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> If no discovery-type property is defined in a simple descriptor, then the
> descriptor handler defaults it to Ambari. The Ambari discovery fails if the
> other required properties are missing.
> If discovery is no intended for a descriptor (no discovery config), then the
> discovery should be skipped rather than defaulting to the Ambari
> implementation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)