knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject knox git commit: KNOX-1411 - WEBHBASE service discovery references incorrect property for the port
Date Wed, 01 Aug 2018 15:22:20 GMT
Repository: knox
Updated Branches:
  refs/heads/master cbf35dfb0 -> 86d3a52e7


KNOX-1411 - WEBHBASE service discovery references incorrect property for the port


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/86d3a52e
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/86d3a52e
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/86d3a52e

Branch: refs/heads/master
Commit: 86d3a52e7709282b0ddd70213fd6e55a4fc616a1
Parents: cbf35df
Author: Phil Zampino <pzampino@apache.org>
Authored: Wed Aug 1 11:04:17 2018 -0400
Committer: Phil Zampino <pzampino@apache.org>
Committed: Wed Aug 1 11:04:17 2018 -0400

----------------------------------------------------------------------
 .../main/resources/ambari-service-discovery-url-mappings.xml | 6 +++---
 .../discovery/ambari/AmbariDynamicServiceURLCreatorTest.java | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/86d3a52e/gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml
----------------------------------------------------------------------
diff --git a/gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml
b/gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml
index a41bbed..3653ba1 100644
--- a/gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml
+++ b/gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml
@@ -68,15 +68,15 @@
     </service>
 
     <service name="WEBHBASE">
-        <url-pattern>http://{HOST}:{MASTER_PORT}</url-pattern>
+        <url-pattern>http://{HOST}:{REST_PORT}</url-pattern>
         <properties>
             <property name="HOST">
                 <component>HBASE_MASTER</component>
                 <hostname/>
             </property>
-            <property name="MASTER_PORT">
+            <property name="REST_PORT">
                 <component>HBASE_MASTER</component>
-                <config-property>hbase.master.info.port</config-property>
+                <config-property>hbase.rest.port</config-property>
             </property>
         </properties>
     </service>

http://git-wip-us.apache.org/repos/asf/knox/blob/86d3a52e/gateway-discovery-ambari/src/test/java/org/apache/knox/gateway/topology/discovery/ambari/AmbariDynamicServiceURLCreatorTest.java
----------------------------------------------------------------------
diff --git a/gateway-discovery-ambari/src/test/java/org/apache/knox/gateway/topology/discovery/ambari/AmbariDynamicServiceURLCreatorTest.java
b/gateway-discovery-ambari/src/test/java/org/apache/knox/gateway/topology/discovery/ambari/AmbariDynamicServiceURLCreatorTest.java
index 96d8622..9660a84 100644
--- a/gateway-discovery-ambari/src/test/java/org/apache/knox/gateway/topology/discovery/ambari/AmbariDynamicServiceURLCreatorTest.java
+++ b/gateway-discovery-ambari/src/test/java/org/apache/knox/gateway/topology/discovery/ambari/AmbariDynamicServiceURLCreatorTest.java
@@ -325,13 +325,17 @@ public class AmbariDynamicServiceURLCreatorTest {
     private void testWebHBaseURL(Object mappingConfiguration) throws Exception {
         final String[] HOSTNAMES = {"host2", "host4"};
         final String HBASE_MASTER_PORT_PROPERTY = "hbase.master.info.port";
+        final String HBASE_REST_PORT_PROPERTY = "hbase.rest.port";
 
         AmbariComponent hbaseMaster = EasyMock.createNiceMock(AmbariComponent.class);
         Map<String, String> hbaseMasterConfig = new HashMap<>();
-        hbaseMasterConfig.put(HBASE_MASTER_PORT_PROPERTY, "60080");
+        hbaseMasterConfig.put(HBASE_MASTER_PORT_PROPERTY, "60088");
+        hbaseMasterConfig.put(HBASE_REST_PORT_PROPERTY, "60080");
         EasyMock.expect(hbaseMaster.getConfigProperties()).andReturn(hbaseMasterConfig).anyTimes();
         EasyMock.expect(hbaseMaster.getConfigProperty(HBASE_MASTER_PORT_PROPERTY))
                 .andReturn(hbaseMasterConfig.get(HBASE_MASTER_PORT_PROPERTY)).anyTimes();
+        EasyMock.expect(hbaseMaster.getConfigProperty(HBASE_REST_PORT_PROPERTY))
+                .andReturn(hbaseMasterConfig.get(HBASE_REST_PORT_PROPERTY)).anyTimes();
         List<String> hbaseMasterHosts = Arrays.asList(HOSTNAMES);
         EasyMock.expect(hbaseMaster.getHostNames()).andReturn(hbaseMasterHosts).anyTimes();
         EasyMock.replay(hbaseMaster);
@@ -343,7 +347,7 @@ public class AmbariDynamicServiceURLCreatorTest {
         // Run the test
         AmbariDynamicServiceURLCreator builder = newURLCreator(cluster, mappingConfiguration);
         List<String> urls = builder.create("WEBHBASE", null);
-        validateServiceURLs(urls, HOSTNAMES, "http", hbaseMasterConfig.get(HBASE_MASTER_PORT_PROPERTY),
null);
+        validateServiceURLs(urls, HOSTNAMES, "http", hbaseMasterConfig.get(HBASE_REST_PORT_PROPERTY),
null);
     }
 
 


Mime
View raw message