Ver Fonte

AMBARI-11874. Install Wizard: yarn.resourcemanager.zk-address includes only one host (akovalenko)

Aleksandr Kovalenko há 10 anos atrás
pai
commit
0e8b9bd1ee

+ 3 - 1
ambari-web/app/utils/configs/config_property_helper.js

@@ -247,7 +247,9 @@ module.exports = {
         }
         break;
       case 'yarn.resourcemanager.zk-address':
-        var value = masterComponentHostsInDB.findProperty('component', 'ZOOKEEPER_SERVER').hostName + ':' + dependencies.clientPort;
+        var value = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').map(function (component) {
+          return component.hostName + ':' + dependencies.clientPort
+        }).join(',');
         configProperty.setProperties({
           value: value,
           recommendedValue: value

+ 1 - 1
ambari-web/test/utils/configs/config_property_helper_test.js

@@ -301,7 +301,7 @@ describe('configPropertyHelper', function () {
           clientPort: '2182'
         },
         recommendedValue: 'localhost:2181',
-        value: 'h0:2182',
+        value: 'h0:2182,h1:2182',
         title: 'should add ZK host and port dynamically'
       },
       'oozieserver_host': {