[
https://issues.apache.org/jira/browse/KNOX-2573?focusedWorklogId=578543&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-578543
]
ASF GitHub Bot logged work on KNOX-2573:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Apr/21 18:38
Start Date: 07/Apr/21 18:38
Worklog Time Spent: 10m
Work Description: pzampino commented on a change in pull request #431:
URL: https://github.com/apache/knox/pull/431#discussion_r608902838
##########
File path:
gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/hive/HiveServiceModelGenerator.java
##########
@@ -115,11 +116,16 @@ protected String getHttpPath(ApiConfigList roleConfig) {
protected void checkHiveServer2HTTPMode(ApiConfigList roleConfig,
ServiceModelGeneratorHandleResponse response) {
final String hiveServer2SafetyValve = getRoleConfigValue(roleConfig,
SAFETY_VALVE);
final String hiveServer2TransportMode = hiveServer2SafetyValve == null ?
null : getSafetyValveValue(hiveServer2SafetyValve, TRANSPORT_MODE);
- if (hiveServer2TransportMode == null ) {
- response.addConfigurationIssue("Missing configuration: " +
TRANSPORT_MODE);
- } else if (!TRANSPORT_MODE_HTTP.equals(hiveServer2TransportMode)) {
- response.addConfigurationIssue("Invalid configuration: " +
TRANSPORT_MODE + ". Expected=" + TRANSPORT_MODE_HTTP + "; Found=" +
hiveServer2TransportMode);
- }
+ validateTransportMode(TRANSPORT_MODE, hiveServer2TransportMode, response);
}
+ protected void validateTransportMode(final String configPropName,
+ final String transportMode,
+ final
ServiceModelGeneratorHandleResponse response) {
+ if (transportMode == null ) {
+ response.addConfigurationIssue("Missing configuration: " +
configPropName);
+ } else if (!TRANSPORT_MODE_HTTP.equalsIgnoreCase(transportMode) &&
!TRANSPORT_MODE_ALL.equalsIgnoreCase(transportMode)) {
+ response.addConfigurationIssue("Invalid configuration: " +
configPropName + ". Expected=" + TRANSPORT_MODE_HTTP + "; Found=" +
transportMode);
Review comment:
Ughh! Yes, it should. That change got lost in my refactoring. Thanks for
noticing.
--
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: 578543)
Time Spent: 0.5h (was: 20m)
> Service discovery should support HiveServer2 transport mode all
> ---------------------------------------------------------------
>
> Key: KNOX-2573
> URL: https://issues.apache.org/jira/browse/KNOX-2573
> Project: Apache Knox
> Issue Type: Bug
> Components: cm-discovery
> Affects Versions: 1.6.0
> Reporter: Philip Zampino
> Assignee: Philip Zampino
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> HiveServer2 has a transport mode "all", which includes "http", but Knox's CM
> discovery does not currently recognize this as a supported transport mode and
> thus won't discover the URLs. Knox should treat the "all" mode the same way
> it treats the "http" mode.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)