You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/10/19 16:30:54 UTC
ambari git commit: AMBARI-13473 Navigation between pages in installer
too long. (atkach)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 7d96c7e9e -> 291157741
AMBARI-13473 Navigation between pages in installer too long. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/29115774
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/29115774
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/29115774
Branch: refs/heads/branch-2.1
Commit: 291157741e8686889d5aff36a4c8a5cd7899950a
Parents: 7d96c7e
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Mon Oct 19 17:15:54 2015 +0300
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Mon Oct 19 17:15:54 2015 +0300
----------------------------------------------------------------------
.../app/controllers/wizard/step7_controller.js | 17 +++++++++++++++--
ambari-web/app/mappers/configs/themes_mapper.js | 2 ++
.../app/utils/configs/config_property_helper.js | 9 +--------
.../utils/configs/config_property_helper_test.js | 8 ++++----
4 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index f4c4a4e..d24d978 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -816,12 +816,25 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
});
services.forEach(function (service) {
var configsByService = [];
- var serviceConfigs = configs.filterProperty('serviceName', service.get('serviceName'));
+ var dependencies = {};
+ var serviceConfigs = [];
+
+ configs.forEach(function (config) {
+ if (config.serviceName === service.get('serviceName')) {
+ serviceConfigs.push(config);
+ }
+ if (config.filename === 'hive-site.xml' && config.name === 'hive.metastore.uris') {
+ dependencies['hive.metastore.uris'] = config.recommendedValue;
+ }
+ if (config.filename === 'zoo.cfg.xml' && config.name === 'clientPort') {
+ dependencies['clientPort'] = config.recommendedValue;
+ }
+ }, this);
serviceConfigs.forEach(function (_config) {
var serviceConfigProperty = App.ServiceConfigProperty.create(_config);
this.updateHostOverrides(serviceConfigProperty, _config);
if (!storedConfigs && !serviceConfigProperty.get('hasInitialValue')) {
- configPropertyHelper.initialValue(serviceConfigProperty, localDB, configs);
+ configPropertyHelper.initialValue(serviceConfigProperty, localDB, dependencies);
}
serviceConfigProperty.validate();
configsByService.pushObject(serviceConfigProperty);
http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/mappers/configs/themes_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js b/ambari-web/app/mappers/configs/themes_mapper.js
index 2fc9641..fff2013 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -71,6 +71,7 @@ App.themesMapper = App.QuickDataMapper.create({
},
map: function (json) {
+ console.time('App.themesMapper execution time');
var tabs = [];
json.items.forEach(function(item) {
this.mapThemeLayouts(item, tabs);
@@ -80,6 +81,7 @@ App.themesMapper = App.QuickDataMapper.create({
App.store.loadMany(this.get("tabModel"), tabs);
App.store.commit();
+ console.timeEnd('App.themesMapper execution time');
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/utils/configs/config_property_helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/config_property_helper.js b/ambari-web/app/utils/configs/config_property_helper.js
index 11f1d81..d3f0bd5 100644
--- a/ambari-web/app/utils/configs/config_property_helper.js
+++ b/ambari-web/app/utils/configs/config_property_helper.js
@@ -20,14 +20,7 @@ var App = require('app');
module.exports = {
- initialValue: function (configProperty, localDB, configs) {
- var hiveMetastoreUrisConfig = configs.filterProperty('filename', 'hive-site.xml').findProperty('name', 'hive.metastore.uris');
- var clientPortConfig = configs.filterProperty('filename', 'zoo.cfg.xml').findProperty('name', 'clientPort');
- var dependencies = {
- 'hive.metastore.uris': hiveMetastoreUrisConfig && hiveMetastoreUrisConfig.recommendedValue,
- 'clientPort': clientPortConfig && clientPortConfig.recommendedValue
- };
-
+ initialValue: function (configProperty, localDB, dependencies) {
var masterComponentHostsInDB = localDB.masterComponentHosts;
var isOnlyFirstOneNeeded = true;
var hostWithPort = "([\\w|\\.]*)(?=:)";
http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/test/utils/configs/config_property_helper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/configs/config_property_helper_test.js b/ambari-web/test/utils/configs/config_property_helper_test.js
index 70fb4da..853a830 100644
--- a/ambari-web/test/utils/configs/config_property_helper_test.js
+++ b/ambari-web/test/utils/configs/config_property_helper_test.js
@@ -280,7 +280,7 @@ describe('configPropertyHelper', function () {
dependencies: {
'hive.metastore.uris': 'thrift://localhost:9083'
},
- recommendedValue: 'hive.metastore.local=false,hive.metastore.uris=thrift://localhost:9933,hive.metastore.sasl.enabled=false',
+ recommendedValue: 'hive.metastore.local=false,hive.metastore.uris=thrift://localhost:9083,hive.metastore.sasl.enabled=false',
value: 'hive.metastore.local=false,hive.metastore.uris=thrift://h0:9083\\,thrift://h1:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
title: 'should add relevant hive.metastore.uris value'
},
@@ -402,7 +402,7 @@ describe('configPropertyHelper', function () {
name: 'hive.metastore.uris',
recommendedValue: cases['hive.metastore.uris'].recommendedValue
});
- configPropertyHelper.initialValue(serviceConfigProperty, cases['hive.metastore.uris'].localDB, [{name:'hive.metastore.uris', recommendedValue:cases['hive.metastore.uris'].dependencies['hive.metastore.uris'], filename: 'hive-site.xml'}]);
+ configPropertyHelper.initialValue(serviceConfigProperty, cases['hive.metastore.uris'].localDB, {'hive.metastore.uris': cases['hive.metastore.uris'].recommendedValue});
expect(serviceConfigProperty.get('value')).to.equal(cases['hive.metastore.uris'].value);
expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['hive.metastore.uris'].value);
});
@@ -413,7 +413,7 @@ describe('configPropertyHelper', function () {
recommendedValue: cases['templeton.hive.properties'].recommendedValue,
value: cases['templeton.hive.properties'].recommendedValue
});
- configPropertyHelper.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB, [{name:'hive.metastore.uris', recommendedValue:cases['templeton.hive.properties'].dependencies['hive.metastore.uris'], filename: 'hive-site.xml'}]);
+ configPropertyHelper.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB, {'hive.metastore.uris': cases['templeton.hive.properties'].recommendedValue});
expect(serviceConfigProperty.get('value')).to.equal(cases['templeton.hive.properties'].value);
expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['templeton.hive.properties'].value);
});
@@ -423,7 +423,7 @@ describe('configPropertyHelper', function () {
name: 'yarn.resourcemanager.zk-address',
recommendedValue: cases['yarn.resourcemanager.zk-address'].recommendedValue
});
- configPropertyHelper.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB, [{name:'clientPort', recommendedValue:cases['yarn.resourcemanager.zk-address'].dependencies['clientPort'], filename: 'zoo.cfg.xml'}]);
+ configPropertyHelper.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB, cases['yarn.resourcemanager.zk-address'].dependencies);
expect(serviceConfigProperty.get('value')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
});