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/06/22 03:23:16 UTC

svn commit: r1495654 - in /incubator/ambari/trunk/ambari-web/app: assets/data/configurations/ controllers/global/ controllers/main/service/info/ controllers/wizard/ data/ models/ views/wizard/

Author: yusaku
Date: Sat Jun 22 01:23:16 2013
New Revision: 1495654

URL: http://svn.apache.org/r1495654
Log:
AMBARI-2466. Hive/Oozie database settings should accept custom JDBC URLs. (yusaku)

Modified:
    incubator/ambari/trunk/ambari-web/app/assets/data/configurations/cluster_level_configs.json
    incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
    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
    incubator/ambari/trunk/ambari-web/app/models/cluster_states.js
    incubator/ambari/trunk/ambari-web/app/views/wizard/controls_view.js

Modified: incubator/ambari/trunk/ambari-web/app/assets/data/configurations/cluster_level_configs.json
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/configurations/cluster_level_configs.json?rev=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/configurations/cluster_level_configs.json (original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/configurations/cluster_level_configs.json Sat Jun 22 01:23:16 2013
@@ -474,7 +474,7 @@
         "rca_enabled" : "true",
         "gmetad_user" : "nobody",
         "gpl_artifacts_download_url" : "",
-        "hive_metastore_user_passwd" : "h",
+        "hive_metastore_user_passwd" : "hivepassword",
         "hcat_log_dir" : "/var/log/webhcat",
         "jtnode_heapsize" : "1024m",
         "syncLimit" : "5",
@@ -483,14 +483,14 @@
         "fs_checkpoint_size" : "0.5",
         "initLimit" : "10",
         "mapred_system_dir" : "/mapred/system",
-        "hive_database" : "New MySQL Database",
+        "hive_database" : "Existing Oracle Database",
         "mapred_job_map_mem_mb" : "-1",
         "hive_conf_dir" : "/etc/hive/conf",
         "hdfs_log_dir_prefix" : "/var/log/hadoop",
         "keytab_path" : "/etc/security/keytabs",
         "lzo_enabled" : "false",
         "proxyuser_group" : "users",
-        "hive_database_name" : "hive",
+        "hive_database_name" : "XE",
         "hcat_pid_dir" : "/var/run/webhcat",
         "client_scannercaching" : "100",
         "hdfs_enable_shortcircuit_read" : "true",
@@ -511,7 +511,7 @@
         "mapred_red_tasks_max" : "2",
         "regionserver_memstore_lowerlimit" : "0.35",
         "apache_artifacts_download_url" : "",
-        "hive_metastore_user_name" : "hive",
+        "hive_metastore_user_name" : "hiveuser",
         "mapred_hosts_include" : "mapred.include",
         "hstore_blockingstorefiles" : "7",
         "sqoop_user" : "sqoop",
@@ -538,7 +538,15 @@
         "scheduler_name" : "org.apache.hadoop.mapred.CapacityTaskScheduler",
         "rrdcached_base_dir" : "/var/lib/ganglia/rrds",
         "hstorefile_maxsize" : "1073741824",
-        "hbase_master_heapsize" : "1024m"
+        "hbase_master_heapsize" : "1024m",
+        "hive_hostname": "hive-orcl-host",
+        "hive_jdbc_connection_url": "jdbc:oracle:thin:@//hive-orcl-host:1521/XE",
+        "oozie_hostname": "oozie-orcl-host",
+        "oozie_database": "Existing Oracle Database",
+        "oozie_database_name": "XE",
+        "oozie_metastore_user_name" : "oozieuser",
+        "oozie_metastore_user_passwd" : "ooziepassword",
+        "oozie_jdbc_connection_url": "jdbc:oracle:thin:@//oozie-orcl-host:1521/XE"
       }
     }
   ]

Modified: incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js?rev=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js Sat Jun 22 01:23:16 2013
@@ -53,6 +53,7 @@ App.ClusterController = Em.Controller.ex
     'hosts':false,
     'services':false,
     'cluster':false,
+    'clusterStatus':false,
     'racks':false,
     'alerts':false,
     'users':false,
@@ -324,6 +325,14 @@ App.ClusterController = Em.Controller.ex
         self.updateLoadStatus('cluster');
     });
 
+    if (App.testMode) {
+      self.updateLoadStatus('clusterStatus');
+    } else {
+      App.clusterStatus.updateFromServer(true).complete(function() {
+        self.updateLoadStatus('clusterStatus');
+      });
+    }
+    
     App.HttpClient.get(hostsUrl, App.hostsMapper, {
       complete:function (jqXHR, textStatus) {
         self.updateLoadStatus('hosts');

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=1495654&r1=1495653&r2=1495654&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 Sat Jun 22 01:23:16 2013
@@ -1042,7 +1042,7 @@ App.MainServiceInfoConfigsController = E
           value = this._replaceConfigValues(name, _express, value, globValue);
         }
         if(globalObj.overrides!=null){
-          for(ov in globalObj.overrides){
+          for(var ov in globalObj.overrides){
             var hostsArray = globalObj.overrides[ov];
             hostsArray.forEach(function(host){
               if(!(host in overrideHostToValue)){
@@ -1425,24 +1425,28 @@ App.MainServiceInfoConfigsController = E
     var jdbcDriver = siteObj.findProperty('name', 'oozie.service.JPAService.jdbc.driver');
 
     var oozieDb = this.get('globalConfigs').findProperty('name', 'oozie_database').value;
-    // oozieHost is undefined if the database is oozie
+    // oozieHost is undefined if the database is derby
     var oozieHost = (oozieDb == 'New Derby Database') ? '' : this.get('globalConfigs').findProperty('name', 'oozie_hostname').value;
     var oozieDbName = this.get('globalConfigs').findProperty('name', 'oozie_database_name').value;
+    var defaultJdbcUrl;
 
     switch (oozieDb) {
       case 'New Derby Database':
-        jdbcUrl.value = "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true";
+        defaultJdbcUrl = "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true";
         jdbcDriver.value = "org.apache.derby.jdbc.EmbeddedDriver";
         break;
       case 'Existing MySQL Database':
-        jdbcUrl.value = "jdbc:mysql://" + oozieHost + "/" + oozieDbName;
+        defaultJdbcUrl = "jdbc:mysql://" + oozieHost + "/" + oozieDbName;
         jdbcDriver.value = "com.mysql.jdbc.Driver";
         break;
       case 'Existing Oracle Database':
-        jdbcUrl.value = "jdbc:oracle:thin:@//" + oozieHost + ":1521/" + oozieDbName;
+        defaultJdbcUrl = "jdbc:oracle:thin:@//" + oozieHost + ":1521/" + oozieDbName;
         jdbcDriver.value = "oracle.jdbc.driver.OracleDriver";
         break;
     }
+    // in case the user upgraded from Ambari version <= 1.2.3, they will not have oozie_jdbc_connection_url global
+    var jdbcUrlInGlobal = this.get('globalConfigs').findProperty('name', 'oozie_jdbc_connection_url');
+    jdbcUrl.value = jdbcUrlInGlobal ? jdbcUrlInGlobal.value : defaultJdbcUrl;
     return siteObj;
   },
 
@@ -1458,21 +1462,25 @@ App.MainServiceInfoConfigsController = E
     var hiveDb = this.get('globalConfigs').findProperty('name', 'hive_database').value;
     var hiveHost = this.get('globalConfigs').findProperty('name', 'hive_hostname').value;
     var hiveDbName = this.get('globalConfigs').findProperty('name', 'hive_database_name').value;
+    var defaultJdbcUrl;
 
     switch (hiveDb) {
       case 'New MySQL Database':
-        jdbcUrl.value = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
+        defaultJdbcUrl = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
         jdbcDriver.value = "com.mysql.jdbc.Driver";
         break;
       case 'Existing MySQL Database':
-        jdbcUrl.value = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
+        defaultJdbcUrl = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
         jdbcDriver.value = "com.mysql.jdbc.Driver";
         break;
       case 'Existing Oracle Database':
-        jdbcUrl.value = "jdbc:oracle:thin:@//"+ hiveHost + ":1521/" + hiveDbName;
+        defaultJdbcUrl = "jdbc:oracle:thin:@//"+ hiveHost + ":1521/" + hiveDbName;
         jdbcDriver.value = "oracle.jdbc.driver.OracleDriver";
         break;
     }
+    // in case the user upgraded from Ambari <= 1.2.3, they will not have hive_jdbc_connection_url global
+    var jdbcUrlInGlobal = this.get('globalConfigs').findProperty('name', 'hive_jdbc_connection_url');
+    jdbcUrl.value = jdbcUrlInGlobal ? jdbcUrlInGlobal.value : defaultJdbcUrl;
     return siteObj;
   },
 
@@ -1617,4 +1625,4 @@ App.MainServiceInfoConfigsController = E
   doCancel: function () {
     this.loadStep();
   }
-});
\ No newline at end of file
+});

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=1495654&r1=1495653&r2=1495654&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 Sat Jun 22 01:23:16 2013
@@ -1528,13 +1528,13 @@ App.WizardStep8Controller = Em.Controlle
       var oozieHost = globals.findProperty('name', 'oozie_hostname').value;
       var oozieDbName = globals.findProperty('name', 'oozie_database_name').value;
       if (oozieDb.value === 'New Derby Database') {
-        oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true";
+        // oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true";
         oozieProperties["oozie.service.JPAService.jdbc.driver"] = "org.apache.derby.jdbc.EmbeddedDriver";
       } else if (oozieDb.value === 'Existing MySQL Database') {
-        oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:mysql://" + oozieHost + "/" + oozieDbName;
+        // oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:mysql://" + oozieHost + "/" + oozieDbName;
         oozieProperties["oozie.service.JPAService.jdbc.driver"] = "com.mysql.jdbc.Driver";
       } else { //existing oracle database
-        oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:oracle:thin:@//" + oozieHost + ":1521/" + oozieDbName;
+        // oozieProperties["oozie.service.JPAService.jdbc.url"] = "jdbc:oracle:thin:@//" + oozieHost + ":1521/" + oozieDbName;
         oozieProperties["oozie.service.JPAService.jdbc.driver"] = "oracle.jdbc.driver.OracleDriver";
       }
       //set oozie username and password
@@ -1557,13 +1557,13 @@ App.WizardStep8Controller = Em.Controlle
       var hiveHost = globals.findProperty('name', 'hive_hostname').value;
       var hiveDbName = globals.findProperty('name', 'hive_database_name').value;
       if (hiveDb.value === 'New MySQL Database') {
-        hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
+        // hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
         hiveProperties["javax.jdo.option.ConnectionDriverName"] = "com.mysql.jdbc.Driver";
       } else if (hiveDb.value === 'Existing MySQL Database'){
-        hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
+        // hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:mysql://"+ hiveHost + "/" + hiveDbName + "?createDatabaseIfNotExist=true";
         hiveProperties["javax.jdo.option.ConnectionDriverName"] = "com.mysql.jdbc.Driver";
       } else { //existing oracle database
-        hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:oracle:thin:@//"+ hiveHost + ":1521/" + hiveDbName;
+        // hiveProperties["javax.jdo.option.ConnectionURL"] = "jdbc:oracle:thin:@//"+ hiveHost + ":1521/" + hiveDbName;
         hiveProperties["javax.jdo.option.ConnectionDriverName"] = "oracle.jdbc.driver.OracleDriver";
       }
     }

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=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_mapping.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_mapping.js Sat Jun 22 01:23:16 2013
@@ -263,12 +263,11 @@ var configs = [
     "value": "<templateName[0]>",
     "filename": "oozie-site.xml"
   },
-  // oozie.service.JPAService.jdbc.url value is set in code
   {
     "name": "oozie.service.JPAService.jdbc.url",
-    "templateName": [],
+    "templateName": ["oozie_jdbc_connection_url"],
     "foreignKey": null,
-    "value": "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true",  // this value is overwritten in code
+    "value": "<templateName[0]>",
     "filename": "oozie-site.xml"
   },
   {
@@ -294,9 +293,9 @@ var configs = [
   },
   {
     "name": "javax.jdo.option.ConnectionURL",
-    "templateName": [],
+    "templateName": ["hive_jdbc_connection_url"],
     "foreignKey": null,
-    "value": "",  // this value is overwritten in code
+    "value": "<templateName[0]>",
     "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=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_properties.js Sat Jun 22 01:23:16 2013
@@ -1265,6 +1265,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": true,
+      "isObserved": true,
       "serviceName": "HIVE",
       "category": "Hive Metastore",
       "index": 0
@@ -1361,6 +1362,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isObserved": true,
       "domain": "global",
       "serviceName": "HIVE",
       "category": "Hive Metastore",
@@ -1376,6 +1378,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isObserved": true,
       "domain": "global",
       "serviceName": "HIVE",
       "category": "Hive Metastore",
@@ -1391,6 +1394,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": false,
+      "isObserved": true,
       "domain": "global",
       "serviceName": "HIVE",
       "category": "Hive Metastore",
@@ -1422,6 +1426,7 @@ module.exports =
       "displayType": "host",
       "isOverridable": false,
       "isVisible": true,
+      "isObserved": true,
       "domain": "global",
       "serviceName": "HIVE",
       "category": "Hive Metastore",
@@ -1434,7 +1439,7 @@ module.exports =
       "description": "Database user name to use to connect to the database",
       "defaultValue": "hive",
       "isReconfigurable": true,
-      "displayType": "user",
+      "displayType": "host",  // don't apply user validation
       "isOverridable": false,
       "isVisible": true,
       "domain": "global",
@@ -1459,6 +1464,20 @@ module.exports =
     },
     {
       "id": "puppet var",
+      "name": "hive_jdbc_connection_url",
+      "displayName": "Database URL",
+      "value": "",
+      "defaultValue": " ", // set to a space to not include this in initial error count
+      "description": "The JDBC connection URL to the database",
+      "displayType": "advanced",
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore",
+      "index": 7
+    },
+    {
+      "id": "puppet var",
       "name": "hive_metastore_port",
       "displayName": "Hive metastore port",
       "description": "",
@@ -1633,6 +1652,7 @@ module.exports =
       "description": "Using an existing Oracle database for Oozie Metastore",
       "displayType": "masterHost",
       "isVisible": false,
+      "isObserved": true,
       "isReconfigurable": false,
       "isOverridable": false,
       //"domain": "global",
@@ -1753,6 +1773,7 @@ module.exports =
           "isOverridable": false,
           "displayType": "host",
           "isVisible": false,
+          "isObserved": true,
           "domain": "global",
           "serviceName": "OOZIE",
           "category": "Oozie Server",
@@ -1768,6 +1789,7 @@ module.exports =
           "isOverridable": false,
           "displayType": "host",
           "isVisible": false,
+          "isObserved": true,
           "domain": "global",
           "serviceName": "OOZIE",
           "category": "Oozie Server",
@@ -1799,6 +1821,7 @@ module.exports =
           "isOverridable": false,
           "displayType": "host",
           "isVisible": true,
+          "isObserved": true,
           //"domain": "global",
           "serviceName": "OOZIE",
           "category": "Oozie Server",
@@ -1812,7 +1835,7 @@ module.exports =
           "defaultValue": "oozie",
           "isReconfigurable": true,
           "isOverridable": false,
-          "displayType": "user",
+          "displayType": "host",  // don't apply user validation
           "isVisible": true,
           //"domain": "global",
           "serviceName": "OOZIE",
@@ -1834,7 +1857,21 @@ module.exports =
           "category": "Oozie Server",
           "index": 6
       },
-      {
+    {
+      "id": "puppet var",
+      "name": "oozie_jdbc_connection_url",
+      "displayName": "Database URL",
+      "description": "The JDBC connection URL to the database",
+      "defaultValue": " ",  // set to a space to not include this in initial error count
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "displayType": "advanced",
+      "isVisible": true,
+      "serviceName": "OOZIE",
+      "category": "Oozie Server",
+      "index": 7
+    },
+    {
           "id": "puppet var",
           "name": "oozie_data_dir",
           "displayName": "Oozie Data Dir",
@@ -1849,7 +1886,7 @@ module.exports =
           "domain": "global",
           "serviceName": "OOZIE",
           "category": "Oozie Server",
-          "index": 7
+          "index": 8
       },
 
     {

Modified: incubator/ambari/trunk/ambari-web/app/models/cluster_states.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/cluster_states.js?rev=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/cluster_states.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/cluster_states.js Sat Jun 22 01:23:16 2013
@@ -30,14 +30,18 @@ App.clusterStatus = Ember.Object.create(
   key: 'CLUSTER_CURRENT_STATUS',
   /**
    * get cluster data from server and update cluster status
+   * @param isAsync: set this to true if the call is to be made asynchronously.  if unspecified, false is assumed
+   * @return promise object for the get call
    */
-  updateFromServer: function(){
+  updateFromServer: function(isAsync) {
+    // if isAsync is undefined, set it to false
+    isAsync = isAsync || false;
     var url = App.apiPrefix + '/persist/' + this.get('key');
-    jQuery.ajax(
+    return jQuery.ajax(
       {
         url: url,
         context: this,
-        async: false,
+        async: isAsync,
         success: function (response) {
           if (response) {
             var newValue = jQuery.parseJSON(response);

Modified: incubator/ambari/trunk/ambari-web/app/views/wizard/controls_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/wizard/controls_view.js?rev=1495654&r1=1495653&r2=1495654&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/wizard/controls_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/wizard/controls_view.js Sat Jun 22 01:23:16 2013
@@ -53,7 +53,7 @@ App.ServiceConfigTextField = Ember.TextF
   classNameBindings: 'textFieldClassName',
   placeholderBinding: 'serviceConfig.defaultValue',
 
-  keyPress: function(event) {
+  keyPress: function (event) {
     if (event.keyCode == 13) {
       return false;
     }
@@ -115,7 +115,7 @@ App.ServiceConfigPasswordField = Ember.T
 
   template: Ember.Handlebars.compile('{{view view.retypePasswordView}}'),
 
-  keyPress: function(event) {
+  keyPress: function (event) {
     if (event.keyCode == 13) {
       return false;
     }
@@ -125,7 +125,7 @@ App.ServiceConfigPasswordField = Ember.T
     placeholder: Em.I18n.t('form.passwordRetype'),
     type: 'password',
     classNames: [ 'span3', 'retyped-password' ],
-    keyPress: function(event) {
+    keyPress: function (event) {
       if (event.keyCode == 13) {
         return false;
       }
@@ -193,9 +193,99 @@ App.ServiceConfigRadioButtons = Ember.Vi
     '{{/unless}}',
     '{{/each}}'
   ].join('\n')),
+
+  didInsertElement: function () {
+    // on page render, automatically populate JDBC URLs only for default database settings
+    // so as to not lose the user's customizations on these fields
+    if (App.clusterStatus.clusterState == 'CLUSTER_NOT_CREATED_1' && ['New MySQL Database', 'New Derby Database'].contains(this.get('serviceConfig.value'))) {
+      this.onOptionsChange();
+    }
+  },
+
+  configs: function () {
+    return this.get('categoryConfigsAll').filterProperty('isObserved', true);
+  }.property('categoryConfigsAll'),
+
   serviceConfig: null,
   categoryConfigsAll: null,
+
+  onOptionsChange: function () {
+    var connectionUrl = this.get('connectionUrl');
+    if (this.get('serviceConfig.serviceName') === 'HIVE') {
+      if (this.get('hostName') && this.get('databaseName') && connectionUrl) {
+        switch (this.get('serviceConfig.value')) {
+          case 'New MySQL Database':
+          case 'Existing MySQL Database':
+            connectionUrl.set('value', "jdbc:mysql://" + this.get('hostName') + "/" + this.get('databaseName') + "?createDatabaseIfNotExist=true");
+            break;
+          case 'Existing Oracle Database':
+            connectionUrl.set('value', "jdbc:oracle:thin:@//" + this.get('hostName') + ":1521/" + this.get('databaseName'));
+            break;
+        }
+      }
+    } else if (this.get('serviceConfig.serviceName') === 'OOZIE') {
+      if (this.get('hostName') && this.get('databaseName') && connectionUrl) {
+        switch (this.get('serviceConfig.value')) {
+          case 'New Derby Database':
+            connectionUrl.set('value', "jdbc:derby:${oozie.data.dir}/${oozie.db.schema.name}-db;create=true");
+            break;
+          case 'Existing MySQL Database':
+            connectionUrl.set('value', "jdbc:mysql://" + this.get('hostName') + "/" + this.get('databaseName'));
+            break;
+          case 'Existing Oracle Database':
+            connectionUrl.set('value', "jdbc:oracle:thin:@//" + this.get('hostName') + ":1521/" + this.get('databaseName'));
+            break;
+        }
+      }
+    }
+  }.observes('databaseName', 'hostName', 'connectionUrl'),
+
   nameBinding: 'serviceConfig.radioName',
+
+  databaseName: function () {
+    switch (this.get('serviceConfig.serviceName')) {
+      case 'HIVE':
+        return this.get('categoryConfigsAll').findProperty('name', 'hive_database_name').get('value');
+      case 'OOZIE':
+        return this.get('categoryConfigsAll').findProperty('name', 'oozie_database_name').get('value');
+      default:
+        return null;
+    }
+  }.property('configs.@each.value', 'serviceConfig.serviceName'),
+
+
+  hostName: function () {
+    var value = this.get('serviceConfig.value');
+
+    if (this.get('serviceConfig.serviceName') === 'HIVE') {
+      switch (value) {
+        case 'New MySQL Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'hive_ambari_host').get('value');
+        case 'Existing MySQL Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'hive_existing_mysql_host').get('value');
+        case 'Existing Oracle Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'hive_existing_oracle_host').get('value');
+      }
+    } else if (this.get('serviceConfig.serviceName') === 'OOZIE') {
+      switch (value) {
+        case 'New Derby Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'oozie_ambari_host').get('value');
+        case 'Existing MySQL Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'oozie_existing_mysql_host').get('value');
+        case 'Existing Oracle Database':
+          return this.get('categoryConfigsAll').findProperty('name', 'oozie_existing_oracle_host').get('value');
+      }
+    }
+  }.property('serviceConfig.serviceName', 'serviceConfig.value', 'configs.@each.value'),
+
+  connectionUrl: function () {
+    if (this.get('serviceConfig.serviceName') === 'HIVE') {
+      return this.get('categoryConfigsAll').findProperty('name', 'hive_jdbc_connection_url');
+    } else {
+      return this.get('categoryConfigsAll').findProperty('name', 'oozie_jdbc_connection_url');
+    }
+  }.property('serviceConfig.serviceName'),
+
   optionsBinding: 'serviceConfig.options',
   disabled: function () {
     return !this.get('serviceConfig.isEditable');
@@ -224,21 +314,22 @@ App.ServiceConfigRadioButton = Ember.Che
   onChecked: function () {
     this.set('parentView.serviceConfig.value', this.get('value'));
     var components = this.get('parentView.serviceConfig.options');
-    components.forEach(function (_component) {
-      if(_component.foreignKeys){
-        _component.foreignKeys.forEach(function (_componentName) {
-          if (this.get('parentView.categoryConfigsAll').someProperty('name', _componentName)) {
-            var component = this.get('parentView.categoryConfigsAll').findProperty('name', _componentName);
-            if (_component.displayName === this.get('value')) {
-              component.set('isVisible', true);
-            } else {
-              component.set('isVisible', false);
+    components
+      .forEach(function (_component) {
+        if (_component.foreignKeys) {
+          _component.foreignKeys.forEach(function (_componentName) {
+            if (this.get('parentView.categoryConfigsAll').someProperty('name', _componentName)) {
+              var component = this.get('parentView.categoryConfigsAll').findProperty('name', _componentName);
+              if (_component.displayName === this.get('value')) {
+                component.set('isVisible', true);
+              } else {
+                component.set('isVisible', false);
+              }
             }
-          }
-        }, this);
-      }
-    }, this);
-  }.observes('checked') ,
+          }, this);
+        }
+      }, this);
+  }.observes('checked'),
 
   disabled: function () {
     return !this.get('parentView.serviceConfig.isEditable');
@@ -299,7 +390,6 @@ App.ServiceConfigMultipleHostsDisplay = 
     console.log('view', this.get('viewName')); //to know which View cause errors
     console.log('controller', this.get('controller').name); //should be slaveComponentGroupsController
     if (!this.get('value')) {
-      // debugger;
       return true;
     }
     return this.get('value').length === 0;