You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/12/09 14:14:23 UTC
svn commit: r1418934 - in
/incubator/ambari/branches/AMBARI-666/ambari-web/app:
controllers/wizard/step7_controller.js
controllers/wizard/step8_controller.js data/config_mapping.js
Author: yusaku
Date: Sun Dec 9 13:14:22 2012
New Revision: 1418934
URL: http://svn.apache.org/viewvc?rev=1418934&view=rev
Log:
AMBARI-1059. Refactor cluster management. (yusaku)
Modified:
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_mapping.js
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js?rev=1418934&r1=1418933&r2=1418934&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step7_controller.js Sun Dec 9 13:14:22 2012
@@ -42,15 +42,15 @@ App.WizardStep7Controller = Em.Controlle
return !this.stepConfigs.everyProperty('errorCount', 0);
}.property('stepConfigs.@each.errorCount'),
- selectedServiceNames : function(){
+ selectedServiceNames: function () {
return this.get('content.services').filterProperty('isSelected', true).mapProperty('serviceName');
}.property('content.services').cacheable(),
- masterComponentHosts : function(){
+ masterComponentHosts: function () {
return this.get('content.masterComponentHosts');
}.property('content.masterComponentHosts'),
- slaveComponentHosts : function(){
+ slaveComponentHosts: function () {
return this.get('content.slaveComponentHosts');
}.property('content.slaveComponentHosts'),
@@ -71,23 +71,28 @@ App.WizardStep7Controller = Em.Controlle
this.clearStep();
var serviceConfigs = this.get('serviceConfigs');
var advancedConfig = this.get('content.advancedServiceConfig');
- advancedConfig.forEach(function(_config){
- var service = serviceConfigs.findProperty('serviceName',_config.serviceName);
- if(service) {
- if(this.get('configMapping').someProperty('name',_config.name)) {
- } else if(!(service.configs.someProperty('name',_config.name))) {
+ advancedConfig.forEach(function (_config) {
+ var service = serviceConfigs.findProperty('serviceName', _config.serviceName);
+ if (service) {
+ if (this.get('configMapping').someProperty('name', _config.name)) {
+ } else if (!(service.configs.someProperty('name', _config.name))) {
_config.id = "site property";
_config.category = 'Advanced';
_config.displayName = _config.name;
_config.defaultValue = _config.value;
- _config.value = '',
+ if (/\${.*}/.test(_config.value)) {
+ console.log("Step7: The name that matched regex: " + _config.name);
+ _config.isRequired = false;
+ _config.value = '';
+ } else if(/^\s+$/.test(_config.value)){
+ _config.isRequired = false;
+ }
_config.isVisible = true;
- _config.isRequired = false;
_config.displayType = 'advanced';
service.configs.pushObject(_config);
}
}
- },this);
+ }, this);
this.loadCustomConfig();
this.renderServiceConfigs(serviceConfigs);
var storedServices = this.get('content.serviceConfigProperties');
@@ -101,7 +106,7 @@ App.WizardStep7Controller = Em.Controlle
var componentVal = storedServices.findProperty('name', _config.get('name'));
//if we have config for specified component
- if(componentVal){
+ if (componentVal) {
//set it
_config.set('value', componentVal.value)
}
@@ -112,16 +117,16 @@ App.WizardStep7Controller = Em.Controlle
}
},
- loadCustomConfig: function() {
+ loadCustomConfig: function () {
var serviceConfigs = this.get('serviceConfigs');
- this.get('customConfigs').forEach(function(_config){
- var service = serviceConfigs.findProperty('serviceName',_config.serviceName);
- if(service) {
- if(!(service.configs.someProperty('name',_config.name))) {
- service.configs.pushObject(_config);
- }
+ this.get('customConfigs').forEach(function (_config) {
+ var service = serviceConfigs.findProperty('serviceName', _config.serviceName);
+ if (service) {
+ if (!(service.configs.someProperty('name', _config.name))) {
+ service.configs.pushObject(_config);
}
- },this);
+ }
+ }, this);
},
/**
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js?rev=1418934&r1=1418933&r2=1418934&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/wizard/step8_controller.js Sun Dec 9 13:14:22 2012
@@ -913,7 +913,6 @@ App.WizardStep8Controller = Em.Controlle
console.log("STEP*: name of the property is: " + _configProperty.name);
console.log("STEP8: value of the property is: " + _configProperty.value);
}, this);
-
return {type: 'mapred-site', tag: 'version1', properties: mrProperties};
},
@@ -969,7 +968,6 @@ App.WizardStep8Controller = Em.Controlle
console.log("TRACE: STep8 -> In success function for the applyCreatedConfToService call");
console.log("TRACE: STep8 -> value of the url is: " + url);
console.log("TRACE: STep8 -> value of the received data is: " + jsonData);
-
},
error: function (request, ajaxOptions, error) {
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_mapping.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_mapping.js?rev=1418934&r1=1418933&r2=1418934&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_mapping.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/data/config_mapping.js Sun Dec 9 13:14:22 2012
@@ -296,6 +296,25 @@ module.exports = [
"value": "http://<templateName[0]>:11000/oozie",
"filename": "oozie-site.xml"
},
+ //TODO: Oozie configs hardcoded for now. Map them to templates later
+ {
+ "name": "oozie.service.JPAService.jdbc.password",
+ "templateName": [],
+ "value": " ",
+ "filename": "oozie-site.xml"
+ },
+ {
+ "name": "oozie.db.schema.name",
+ "templateName": [],
+ "value": "oozie",
+ "filename": "oozie-site.xml"
+ },
+ {
+ "name": "oozie.service.JPAService.jdbc.url",
+ "templateName": [],
+ "value": "jdbc:derby:/var/data/oozie/oozie-db;create=true",
+ "filename": "oozie-site.xml"
+ },
{
"name": "javax.jdo.option.ConnectionURL",
"templateName": ["hive_mysql_host", "hive_database_name"],
@@ -405,7 +424,7 @@ module.exports = [
"name": "mapred.child.java.opts",
"templateName": ["mapred_child_java_opts_sz"],
"foreignKey": null,
- "value": "<templateName[0]>",
+ "value": "-server -Xmx<templateName[0]>m -Djava.net.preferIPv4Stack=true",
"filename": "mapred-site.xml"
},
{