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 2013/03/14 00:55:15 UTC
svn commit: r1456282 - in /incubator/ambari/trunk: CHANGES.txt
ambari-web/app/controllers/main/service/info/configs.js
ambari-web/app/controllers/wizard/step8_controller.js
ambari-web/app/data/config_mapping.js
ambari-web/app/data/config_properties.js
Author: yusaku
Date: Wed Mar 13 23:55:15 2013
New Revision: 1456282
URL: http://svn.apache.org/r1456282
Log:
AMBARI-1595. Add Oracle option for Hive Metastore during Ambari cluster install. (Xi Wang via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
incubator/ambari/trunk/ambari-web/app/data/config_mapping.js
incubator/ambari/trunk/ambari-web/app/data/config_properties.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1456282&r1=1456281&r2=1456282&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Mar 13 23:55:15 2013
@@ -122,6 +122,9 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1595. Add Oracle option for Hive Metastore during Ambari
+ cluster install. (Xi Wang via yusaku)
+
AMBARI-1632. Provide property filtering capability on service config
sections. (yusaku)
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js?rev=1456282&r1=1456281&r2=1456282&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/info/configs.js Wed Mar 13 23:55:15 2013
@@ -635,15 +635,26 @@ App.MainServiceInfoConfigsController = E
var hiveDb = globals.findProperty('name', 'hive_database');
if (hiveDb.value === 'New MySQL Database') {
if (globals.someProperty('name', 'hive_ambari_host')) {
- globals.findProperty('name', 'hive_ambari_host').name = 'hive_mysql_hostname';
+ globals.findProperty('name', 'hive_ambari_host').name = 'hive_hostname';
}
- globals = globals.without(globals.findProperty('name', 'hive_existing_host'));
- globals = globals.without(globals.findProperty('name', 'hive_existing_database'));
- } else {
- globals.findProperty('name', 'hive_existing_host').name = 'hive_mysql_hostname';
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
+ } else if (hiveDb.value === 'Existing MySQL Database'){
+ globals.findProperty('name', 'hive_existing_mysql_host').name = 'hive_hostname';
+ globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
+ } else{ //existing oracle database
+ globals.findProperty('name', 'hive_existing_oracle_host').name = 'hive_hostname';
globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
}
+
}
},
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js?rev=1456282&r1=1456281&r2=1456282&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step8_controller.js Wed Mar 13 23:55:15 2013
@@ -62,18 +62,35 @@ App.WizardStep8Controller = Em.Controlle
if (globals.someProperty('name', 'hive_database')) {
//TODO: Hive host depends on the type of db selected. Change puppet variable name if postgres is not the default db
var hiveDb = globals.findProperty('name', 'hive_database');
+ var hiveDbType = {name: 'hive_database_type'};
+
if (hiveDb.value === 'New MySQL Database') {
if (globals.someProperty('name', 'hive_ambari_host')) {
- globals.findProperty('name', 'hive_ambari_host').name = 'hive_mysql_hostname';
+ globals.findProperty('name', 'hive_ambari_host').name = 'hive_hostname';
+ hiveDbType.value = 'mysql';
}
- globals = globals.without(globals.findProperty('name', 'hive_existing_host'));
- globals = globals.without(globals.findProperty('name', 'hive_existing_database'));
- } else {
- globals.findProperty('name', 'hive_existing_host').name = 'hive_mysql_hostname';
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
+ } else if (hiveDb.value === 'Existing MySQL Database'){
+ globals.findProperty('name', 'hive_existing_mysql_host').name = 'hive_hostname';
+ hiveDbType.value = 'mysql';
globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_oracle_database'));
+ } else{ //existing oracle database
+ globals.findProperty('name', 'hive_existing_oracle_host').name = 'hive_hostname';
+ hiveDbType.value = 'oracle';
+ globals = globals.without(globals.findProperty('name', 'hive_ambari_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_ambari_database'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_host'));
+ globals = globals.without(globals.findProperty('name', 'hive_existing_mysql_database'));
}
+ globals.push(hiveDbType);
}
+
this.set('globals', globals);
},
@@ -578,9 +595,15 @@ App.WizardStep8Controller = Em.Controlle
dbComponent.set('component_value', 'MySQL (New Database)');
- } else {
+ } else if(hiveDb.value === 'Existing MySQL Database'){
+
+ var db = App.db.getServiceConfigProperties().findProperty('name', 'hive_existing_mysql_database');
+
+ dbComponent.set('component_value', db.value + ' (' + hiveDb.value + ')');
+
+ } else { // existing oracle database
- var db = App.db.getServiceConfigProperties().findProperty('name', 'hive_existing_database');
+ var db = App.db.getServiceConfigProperties().findProperty('name', 'hive_existing_oracle_database');
dbComponent.set('component_value', db.value + ' (' + hiveDb.value + ')');
Modified: incubator/ambari/trunk/ambari-web/app/data/config_mapping.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/config_mapping.js?rev=1456282&r1=1456281&r2=1456282&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_mapping.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_mapping.js Wed Mar 13 23:55:15 2013
@@ -342,9 +342,9 @@ module.exports = [
*/
{
"name": "javax.jdo.option.ConnectionURL",
- "templateName": ["hive_mysql_hostname", "hive_database_name"],
+ "templateName": ["hive_database_type", "hive_hostname", "hive_database_name"],
"foreignKey": null,
- "value": "jdbc:mysql://<templateName[0]>/<templateName[1]>?createDatabaseIfNotExist=true",
+ "value": "jdbc:<templateName[0]>://<templateName[1]>/<templateName[2]>?createDatabaseIfNotExist=true",
"filename": "hive-site.xml"
},
{
Modified: incubator/ambari/trunk/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/config_properties.js?rev=1456282&r1=1456281&r2=1456282&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_properties.js Wed Mar 13 23:55:15 2013
@@ -850,7 +850,11 @@ module.exports =
},
{
displayName: 'Existing MySQL Database',
- foreignKeys: ['hive_existing_database', 'hive_existing_host']
+ foreignKeys: ['hive_existing_mysql_database', 'hive_existing_mysql_host']
+ },
+ {
+ displayName: 'Existing Oracle Database',
+ foreignKeys: ['hive_existing_oracle_database', 'hive_existing_oracle_host']
}
],
"description": "MySQL will be installed by Ambari",
@@ -862,13 +866,14 @@ module.exports =
"serviceName": "HIVE",
"category": "Hive Metastore"
},
+ // for existing MySQL
{
"id": "puppet var",
- "name": "hive_existing_database",
+ "name": "hive_existing_mysql_database",
"displayName": "Database Type",
"value": "",
"defaultValue": "MySQL",
- "description": "Using an existing database for Hive Metastore",
+ "description": "Using an existing MySQL database for Hive Metastore",
"displayType": "masterHost",
"isVisible": false,
"isReconfigurable": false,
@@ -908,7 +913,35 @@ module.exports =
*/
{
"id": "puppet var",
- "name": "hive_existing_host",
+ "name": "hive_existing_mysql_host",
+ "displayName": "Database host",
+ "description": "Specify the host on which the existing database is hosted",
+ "defaultValue": "",
+ "isReconfigurable": false,
+ "displayType": "host",
+ "isVisible": false,
+ "domain": "global",
+ "serviceName": "HIVE",
+ "category": "Hive Metastore"
+ },
+ // for existing Oracle
+ {
+ "id": "puppet var",
+ "name": "hive_existing_oracle_database",
+ "displayName": "Database Type",
+ "value": "",
+ "defaultValue": "Oracle",
+ "description": "Using an existing Oracle database for Hive Metastore",
+ "displayType": "masterHost",
+ "isVisible": false,
+ "isReconfigurable": false,
+ "domain": "global",
+ "serviceName": "HIVE",
+ "category": "Hive Metastore"
+ },
+ {
+ "id": "puppet var",
+ "name": "hive_existing_oracle_host",
"displayName": "Database host",
"description": "Specify the host on which the existing database is hosted",
"defaultValue": "",
@@ -919,6 +952,7 @@ module.exports =
"serviceName": "HIVE",
"category": "Hive Metastore"
},
+ // for new MySQL
{
"id": "puppet var",
"name": "hive_ambari_database",