ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-9019: AMS: Cleanup Frontend logic for MetricsSink based metrics reporting on Windows (Jayush Luniya)
Date Thu, 08 Jan 2015 06:23:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 789b6544d -> 61f3c0227


AMBARI-9019: AMS: Cleanup Frontend logic for MetricsSink based metrics reporting on Windows
(Jayush Luniya)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61f3c022
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61f3c022
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61f3c022

Branch: refs/heads/trunk
Commit: 61f3c0227a5e76d24c3ee8358253332b13b47338
Parents: 789b654
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Wed Jan 7 22:23:49 2015 -0800
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Wed Jan 7 22:23:49 2015 -0800

----------------------------------------------------------------------
 .../controllers/main/service/info/configs.js    |  78 --------
 .../app/controllers/wizard/step7_controller.js  |  17 +-
 .../app/controllers/wizard/step8_controller.js  |  54 ------
 ambari-web/app/data/HDP2/site_properties.js     | 177 -------------------
 ambari-web/app/models/service_config.js         |   5 -
 ambari-web/app/models/stack_service.js          |  24 +--
 ambari-web/app/views/wizard/controls_view.js    |  46 +----
 .../test/controllers/wizard/step7_test.js       |  12 +-
 .../test/views/wizard/controls_view_test.js     |  70 +-------
 9 files changed, 9 insertions(+), 474 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 794a0d9..c9ab6c8 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -846,48 +846,10 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
   },
 
   checkDatabaseProperties: function (serviceConfig) {
-    this.hideSinkDatabaseProperties(serviceConfig.configs);
     this.hideHiveDatabaseProperties(serviceConfig.configs);
     this.hideOozieDatabaseProperties(serviceConfig.configs);
   },
 
-  hideSinkDatabaseProperties: function (configs) {
-    if (!['HDFS'].contains(this.get('content.serviceName'))) return;
-    var property = configs.findProperty('name', 'sink.dbservername');
-    if (property) property.set('isVisible', false);
-    var hadoop_user_property = configs.findProperty('name', 'hadoop.user.name');
-    if(hadoop_user_property)
-    {
-      hadoop_user_property.setProperties({
-        isVisible: false,
-        isRequired: false
-      });
-    }
-
-    var hadoop_password_property = configs.findProperty('name', 'hadoop.user.password');
-    if(hadoop_password_property)
-    {
-      hadoop_password_property.setProperties({
-        isVisible: false,
-        isRequired: false
-      });
-    }
-
-    if (configs.someProperty('name', 'sink_database')) {
-      var sinkDb = configs.findProperty('name', 'sink_database');
-      if (sinkDb.value === 'Existing MSSQL Server database with integrated authentication')
{
-        configs.findProperty('name', 'sink.dblogin').setProperties({
-          isVisible: false,
-          isRequired: false
-        });
-        configs.findProperty('name', 'sink.dbpassword').setProperties({
-          isVisible: false,
-          isRequired: false
-        });
-      }
-    }
-  },
-
   hideHiveDatabaseProperties: function (configs) {
     if (!['HIVE'].contains(this.get('content.serviceName'))) return;
     var property = configs.findProperty('name', 'hive_hostname');
@@ -1547,37 +1509,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     this.onDoPUTClusterConfigurations();
   },
 
-/**
-   * set sink hostnames in configs
-   * @param configs
-   */
-  setSinkHostName: function (configs) {
-    var dbHostPropertyName = null;
-    if (configs.someProperty('name', 'sink_database')) {
-      var sinkDb = configs.findProperty('name', 'sink_database');
-      if (sinkDb.value === 'Existing MSSQL Server database with integrated authentication')
{
-        var existingMSSQLServerHost = configs.findProperty('name', 'sink_existing_mssql_server_host');
-        if (existingMSSQLServerHost) {
-           dbHostPropertyName = 'sink_existing_mssql_server_host';
-        }
-        configs = configs.without(configs.findProperty('name', 'sink_existing_mssql_server_2_database'));
-        configs = configs.without(configs.findProperty('name', 'sink_existing_mssql_server_2_host'));
-      } else if (sinkDb.value === 'Existing MSSQL Server database with sql auth') {
-        var existingMSSQL2ServerHost = configs.findProperty('name', 'sink_existing_mssql_server_2_host');
-        if (existingMSSQL2ServerHost) {
-           dbHostPropertyName = 'sink_existing_mssql_server_2_host';
-        }
-        configs = configs.without(configs.findProperty('name', 'sink_existing_mssql_server_database'));
-        configs = configs.without(configs.findProperty('name', 'sink_existing_mssql_server_host'));
-      }
-    }
-    if (dbHostPropertyName) {
-      var sinkHostNameProperty = App.ServiceConfigProperty.create(App.config.get('preDefinedSiteProperties').findProperty('name',
'sink.dbservername'));
-      sinkHostNameProperty.set('value', configs.findProperty('name', dbHostPropertyName).get('value'));
-      configs.pushObject(sinkHostNameProperty);
-    }
-  },
-
   /**
    * set hive hostnames in configs
    * @param configs
@@ -1816,7 +1747,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     //storedConfigs contains custom configs as well
     this.setHiveHostName(configs);
     this.setOozieHostName(configs);
-    this.setSinkHostName(configs);
     this.formatConfigValues(configs);
     var mappedConfigs = App.config.excludeUnsupportedConfigs(this.get('configMapping').all(),
App.Service.find().mapProperty('serviceName'));
     var allUiConfigs = this.loadUiSideConfigs(mappedConfigs);
@@ -2373,14 +2303,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         configs.findProperty('name', 'oozie_hostname').isVisible = true;
       }
     }
-    if(App.get('isHadoopWindowsStack')) {
-      if (serviceName === 'HDFS') {
-        var sinkDB = configs.findProperty('name', 'sink_database').value;
-        if (['Existing MSSQL Server database with integrated authentication', 'Existing MSSQL
Server database with sql auth'].contains(sinkDB)) {
-          configs.findProperty('name', 'sink.dbservername').isVisible = true;
-        }
-      }
-    }
   },
   /**
    * set host name(s) property for component

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/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 d8fcc27..8e343ce 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -729,17 +729,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
{
       }
     }
 
-    if (!App.get('isHadoopWindowsStack')) {
-      var hdfsService =  serviceConfigs.findProperty('serviceName', 'HDFS');
-      if (hdfsService) {
-        c = hdfsService.configs;
-        c.filterProperty('category', 'MetricsSink').map(function (config) {
-          c = c.without(config);
-        });
-        serviceConfigs.findProperty('serviceName', 'HDFS').configs = c;
-      }
-    }
-
     this.set('stepConfigs', serviceConfigs);
   },
 
@@ -897,25 +886,23 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
{
   },
 
   /**
-   * Check if Oozie, Hive or MetricsSink use existing database then need
+   * Check if Oozie or Hive use existing database then need
    * to restore missed properties
    *
    * @param {Object[]} configs
    **/
   setServiceDatabaseConfigs: function (configs) {
     var serviceNames = this.get('installedServiceNames').filter(function (serviceName) {
-      return ['OOZIE', 'HIVE', 'HDFS'].contains(serviceName);
+      return ['OOZIE', 'HIVE'].contains(serviceName);
     });
     serviceNames.forEach(function (serviceName) {
       var propertyPrefix = serviceName.toLowerCase();
-      if (/HDFS/gi.test(serviceName)) propertyPrefix = 'sink';
       var dbTypeConfig = configs.findProperty('name', propertyPrefix + '_database');
       if (!/existing/gi.test(dbTypeConfig.value)) return;
       var dbHostName = propertyPrefix + '_hostname';
       var database = dbTypeConfig.value.match(/MySQL|PostgreSQL|Oracle|Derby|MSSQL/gi)[0];
       var dbPrefix = database.toLowerCase();
       if (database.toLowerCase() == 'mssql') {
-        dbHostName = 'sink.dbservername';
         if (/integrated/gi.test(dbTypeConfig.value)) {
           dbPrefix = 'mssql_server';
         } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index bf38196..33e8b4d 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -221,38 +221,6 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
   },
 
   /**
-   * Remove unused Sink configs
-   * @param {Ember.Enumerable} configs
-   * @returns {Ember.Enumerable}
-   * @method removeSinkConfigs
-   */
-  removeSinkConfigs: function (configs) {
-    var sinkDb = configs.findProperty('name', 'sink_database');
-    var sinkDbType = configs.findProperty('name', 'sink_database_type');
-    if (sinkDbType) {
-      var sink_properties = Em.A([]);
-
-      switch (sinkDb.value) {
-        case 'Existing MSSQL Server database with integrated authentication':
-          configs.findProperty('name', 'sink.dbservername').value = configs.findProperty('name',
'sink_existing_mssql_server_host').value;
-          sinkDbType.value = 'mssql';
-          sink_properties = Em.A(['sink_existing_mssql_server_2_database', 'sink_existing_mssql_server_2_host']);
-          break;
-        case 'Existing MSSQL Server database with sql auth':
-          configs.findProperty('name', 'sink.dbservername').value = configs.findProperty('name',
'sink_existing_mssql_server_2_host').value;
-          sinkDbType.value = 'mssql';
-          sink_properties = Em.A(['sink_existing_mssql_server_database', 'sink_existing_mssql_server_host']);
-          break;
-      }
-
-      sink_properties.forEach(function (property) {
-        configs = configs.without(configs.findProperty('name', property));
-      });
-    }
-    return configs;
-  },
-
-  /**
    * Remove unused Hive configs
    * @param {Ember.Enumerable} configs
    * @returns {Ember.Enumerable}
@@ -373,9 +341,6 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
     if (configs.someProperty('name', 'hive_database')) {
       configs = this.removeHiveConfigs(configs);
     }
-    if (configs.someProperty('name', 'sink_database')) {
-      configs = this.removeSinkConfigs(configs);
-    }
     if (configs.someProperty('name', 'oozie_database')) {
       configs = this.removeOozieConfigs(configs);
     }
@@ -745,25 +710,6 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
         hostsCount + ' ' + Em.I18n.t('installer.step8.hosts'));
   },
 
-/**
-   * Set displayed MetricsSink DB value based on DB type
-   * @method loadSinkDbValue
-   */
-  loadSinkDbValue: function () {
-    var db, serviceConfigProperties = this.get('wizardController').getDBProperty('serviceConfigProperties'),
-    sinkDb = serviceConfigProperties.findProperty('name', 'sink_database');
-    if (sinkDb.value === 'Existing MSSQL Server database with integrated authentication')
{
-      db = serviceConfigProperties.findProperty('name', 'sink_existing_mssql_server_database');
-      return db.value + ' (' + sinkDb.value + ')';
-    }
-    else {
-      if (sinkDb.value === 'Existing MSSQL Server database with sql auth') {
-        db = serviceConfigProperties.findProperty('name', 'sink_existing_mssql_server_2_database');
-        return db.value + ' (' + sinkDb.value + ')';
-      }
-    }
-  },
-
   /**
    * Set displayed Hive DB value based on DB type
    * @method loadHiveDbValue

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index acb0bed..a02036e 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -78,183 +78,6 @@ module.exports =
       "index": 1
     },
     {
-      "id": "puppet var",
-      "name": "hadoop_host",
-      "displayName": "Hadoop host",
-      "value": "",
-      "defaultValue": "",
-      "description": "A hadoop host from where metrics will be uploaded",
-      "displayType": "masterHost",
-      "isOverridable": false,
-      "isVisible": true,
-      "isRequiredByAgent": false,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 0
-    },
-    {
-      "id": "puppet var",
-      "name": "sink_existing_mssql_server_database",
-      "displayName": "Database Type",
-      "value": "",
-      "defaultValue": "MSSQL",
-      "description": "Using an existing MSSQL database for Metrics Sink",
-      "displayType": "masterHost",
-      "isOverridable": false,
-      "isReconfigurable": false,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 1,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "puppet var",
-      "name": "sink_existing_mssql_server_2_database",
-      "displayName": "Database Type",
-      "value": "",
-      "defaultValue": "MSSQL",
-      "description": "Using an existing MSSQL database for Metrics Sink",
-      "displayType": "masterHost",
-      "isOverridable": false,
-      "isReconfigurable": false,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 1,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "puppet var",
-      "name": "sink_database",
-      "displayName": "Metrics Sink Database",
-      "value": "",
-      "defaultValue": "Existing MSSQL Server database with sql auth",
-      "options": [
-        {
-          displayName: 'Existing MSSQL Server database with integrated authentication',
-          foreignKeys: ['sink_existing_mssql_server_database', 'sink_existing_mssql_server_host']
-        },
-        {
-          displayName: 'Existing MSSQL Server database with sql auth',
-          foreignKeys: ['sink_existing_mssql_server_2_database', 'sink_existing_mssql_server_2_host']
-        }
-      ],
-      "displayType": "radio button",
-      "isReconfigurable": false,
-      "radioName": "sink-database",
-      "isOverridable": false,
-      "isVisible": true,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 2,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.dbservername",
-      "displayName": "Database Host",
-      "description": "Specify the host on which the database is hosted",
-      "defaultValue": "",
-      "isReconfigurable": true,
-      "displayType": "host",
-      "isOverridable": false,
-      "isObserved": true,
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 2,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "puppet var",
-      "name": "sink_existing_mssql_server_host",
-      "displayName": "Database Host",
-      "description": "Specify the host on which the existing database is hosted",
-      "defaultValue": "",
-      "displayType": "host",
-      "isOverridable": false,
-      "isRequiredByAgent": false,
-      "isObserved": true,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 3,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "puppet var",
-      "name": "sink_existing_mssql_server_2_host",
-      "displayName": "Database Host",
-      "description": "Specify the host on which the existing database is hosted",
-      "defaultValue": "",
-      "displayType": "host",
-      "isOverridable": false,
-      "isRequiredByAgent": false,
-      "isObserved": true,
-      "serviceName": "HDFS",
-      "category": "MetricsSink",
-      "index": 3,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.db.schema.name",
-      "displayName": "Database Name",
-      "isOverridable": false,
-      "displayType": "host",
-      "isObserved": true,
-      "isVisible": App.get('isHadoopWindowsStack'),
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 4,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.dblogin",
-      "displayName": "Database Username",
-      "isOverridable": false,
-      "isVisible": App.get('isHadoopWindowsStack'),
-      "displayType": "user",
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 5,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.dbpassword",
-      "displayName": "Database Password",
-      "isOverridable": false,
-      "isVisible": App.get('isHadoopWindowsStack'),
-      "displayType": "password",
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 6,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.jdbc.driver",
-      "displayName": "JDBC Driver Class",
-      "isOverridable": false,
-      "isVisible": App.get('isHadoopWindowsStack'),
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 7,
-      "filename": "cluster-env.xml"
-    },
-    {
-      "id": "site property",
-      "name": "sink.jdbc.url",
-      "displayName": "Database URL",
-      "isOverridable": false,
-      "isVisible": App.get('isHadoopWindowsStack'),
-      "displayType": "advanced",
-      "category": "MetricsSink",
-      "serviceName": "HDFS",
-      "index": 8,
-      "filename": "cluster-env.xml"
-    },
-
-    {
       "id": "site property",
       "name": "dfs.namenode.name.dir",
       "displayName": "NameNode directories",

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index 938a5be..655d81d 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -472,11 +472,6 @@ App.ServiceConfigProperty = Em.Object.extend({
       case 'hadoop_host':
         this.set('value', masterComponentHostsInDB.filterProperty('component', 'NAMENODE').mapProperty('hostName'));
         break;
-      case 'sink_existing_mssql_server_host':
-      case 'sink_existing_mssql_server_2_host':
-        var nameNodeHost = masterComponentHostsInDB.findProperty('component', 'NAMENODE').hostName;
-        this.set('value', nameNodeHost).set('defaultValue', nameNodeHost);
-        break;
       case 'hive_existing_mysql_host':
       case 'hive_existing_postgresql_host':
       case 'hive_existing_oracle_host':

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/models/stack_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index f211119..52389e3 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -141,7 +141,7 @@ App.StackService = DS.Model.extend({
   }.property('configTypes'),
 
   customReviewHandler: function () {
-    return App.get('isHadoopWindowsStack')? App.StackService.reviewWindowsPageHandlers[this.get('serviceName')]
: App.StackService.reviewPageHandlers[this.get('serviceName')];
+    return App.StackService.reviewPageHandlers[this.get('serviceName')];
   }.property('serviceName'),
 
   /**
@@ -153,7 +153,7 @@ App.StackService = DS.Model.extend({
     var configTypes = this.get('configTypes');
     var serviceComponents = this.get('serviceComponents');
     if (configTypes && Object.keys(configTypes).length) {
-      var pattern = ["MetricsSink", "General", "CapacityScheduler", "FaultTolerance", "Isolation",
"Performance", "KDC","^Advanced", "Env$", "^Custom", "Falcon - Oozie integration", "FalconStartupSite",
"FalconRuntimeSite", "MetricCollector"];
+      var pattern = ["General", "CapacityScheduler", "FaultTolerance", "Isolation", "Performance",
"KDC","^Advanced", "Env$", "^Custom", "Falcon - Oozie integration", "FalconStartupSite", "FalconRuntimeSite",
"MetricCollector"];
       configCategories = App.StackService.configCategories.call(this).filter(function (_configCategory)
{
         var serviceComponentName = _configCategory.get('name');
         var isServiceComponent = serviceComponents.someProperty('componentName', serviceComponentName);
@@ -209,30 +209,10 @@ App.StackService.reviewPageHandlers = {
   }
 };
 
-App.StackService.reviewWindowsPageHandlers = {
-  'HIVE': {
-    'Database': 'loadHiveDbValue'
-  },
-  'HDFS': {
-    'Database': 'loadSinkDbValue'
-  },
-  'NAGIOS': {
-    'Administrator': 'loadNagiosAdminValue'
-  },
-  'OOZIE': {
-    'Database': 'loadOozieDbValue'
-  }
-};
-
 App.StackService.configCategories = function () {
   var serviceConfigCategories = [];
   switch (this.get('serviceName')) {
     case 'HDFS':
-      if (App.get('isHadoopWindowsStack')) {
-        serviceConfigCategories.pushObjects([
-          App.ServiceConfigCategory.create({ name: 'MetricsSink', displayName: 'Metrics Sink'})
-        ]);
-      }
       serviceConfigCategories.pushObjects([
         App.ServiceConfigCategory.create({ name: 'NAMENODE', displayName: 'NameNode'}),
         App.ServiceConfigCategory.create({ name: 'SECONDARY_NAMENODE', displayName: 'Secondary
NameNode'}),

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/app/views/wizard/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/controls_view.js b/ambari-web/app/views/wizard/controls_view.js
index ba60a8d..a6651ec 100644
--- a/ambari-web/app/views/wizard/controls_view.js
+++ b/ambari-web/app/views/wizard/controls_view.js
@@ -339,26 +339,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
             isVisible: isNotExistingMySQLServer,
             isRequired: isNotExistingMySQLServer
           });
-        } else if (this.get('serviceConfig.serviceName') === 'HDFS') {
-          switch (this.get('serviceConfig.value')) {
-            case 'Existing MSSQL Server database with integrated authentication':
-              connectionUrl.set('value', "jdbc:sqlserver://" + this.get('hostName') + ";databaseName="
+ this.get('databaseName') + ";integratedSecurity=true");
-              dbClass.set('value', "com.microsoft.sqlserver.jdbc.SQLServerDriver");
-              break;
-            case 'Existing MSSQL Server database with sql auth':
-              connectionUrl.set('value', "jdbc:sqlserver://" + this.get('hostName') + ";databaseName="
+ this.get('databaseName'));
-              dbClass.set('value', "com.microsoft.sqlserver.jdbc.SQLServerDriver");
-              break;
-          }
-          var isNotExistingMySQLServer = this.get('serviceConfig.value') !== 'Existing MSSQL
Server database with integrated authentication';
-          this.get('categoryConfigsAll').findProperty('name', 'sink.dblogin').setProperties({
-            isVisible: isNotExistingMySQLServer,
-            isRequired: isNotExistingMySQLServer
-          });
-          this.get('categoryConfigsAll').findProperty('name', 'sink.dbpassword').setProperties({
-            isVisible: isNotExistingMySQLServer,
-            isRequired: isNotExistingMySQLServer
-          });
         }
         connectionUrl.set('defaultValue', connectionUrl.get('value'));
       }
@@ -371,8 +351,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
     switch (this.get('serviceConfig.serviceName')) {
       case 'HIVE':
         return this.get('categoryConfigsAll').findProperty('name', 'ambari.hive.db.schema.name');
-      case 'HDFS':
-        return this.get('categoryConfigsAll').findProperty('name', 'sink.db.schema.name');
       case 'OOZIE':
         return this.get('categoryConfigsAll').findProperty('name', 'oozie.db.schema.name');
       default:
@@ -414,20 +392,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
       } else {
         returnValue = this.get('categoryConfigsAll').findProperty('name', 'hive_hostname');
       }
-    } else if (this.get('serviceConfig.serviceName') === 'HDFS') {
-      switch (value) {
-        case 'Existing MSSQL Server database with integrated authentication':
-          hostname = this.get('categoryConfigsAll').findProperty('name', 'sink_existing_mssql_server_host');
-          break;
-        case 'Existing MSSQL Server database with sql auth':
-          hostname = this.get('categoryConfigsAll').findProperty('name', 'sink_existing_mssql_server_2_host');
-          break;
-      }
-      if (hostname) {
-        returnValue = hostname;
-      } else {
-        returnValue = this.get('categoryConfigsAll').findProperty('name', 'sink.dbservername');
-      }
     } else if (this.get('serviceConfig.serviceName') === 'OOZIE') {
       switch (value) {
         case 'New Derby Database':
@@ -465,8 +429,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
   connectionUrl: function () {
     if (this.get('serviceConfig.serviceName') === 'HIVE') {
       return this.get('categoryConfigsAll').findProperty('name', 'javax.jdo.option.ConnectionURL');
-    } else if (this.get('serviceConfig.serviceName') === 'HDFS') {
-      return this.get('categoryConfigsAll').findProperty('name', 'sink.jdbc.url');
     } else {
       return this.get('categoryConfigsAll').findProperty('name', 'oozie.service.JPAService.jdbc.url');
     }
@@ -475,8 +437,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
   dbClass: function () {
     if (this.get('serviceConfig.serviceName') === 'HIVE') {
       return this.get('categoryConfigsAll').findProperty('name', 'javax.jdo.option.ConnectionDriverName');
-    } else if (this.get('serviceConfig.serviceName') === 'HDFS') {
-      return this.get('categoryConfigsAll').findProperty('name', 'sink.jdbc.driver');
     } else {
       return this.get('categoryConfigsAll').findProperty('name', 'oozie.service.JPAService.jdbc.driver');
     }
@@ -491,7 +451,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
    * @method handleDBConnectionProperty
    **/
   handleDBConnectionProperty: function() {
-    var handledProperties = ['oozie_database', 'hive_database', 'sink_database'];
+    var handledProperties = ['oozie_database', 'hive_database'];
     var currentValue = this.get('serviceConfig.value');
     var databases = /MySQL|PostgreSQL|Oracle|Derby|MSSQL/gi;
     var currentDB = currentValue.match(databases)[0];
@@ -510,7 +470,6 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
     // warning msg under database type radio buttons, to warn the user to setup jdbc driver
if existed db selected
     var propertyHive = this.get('categoryConfigsAll').findProperty('displayName', 'Hive Database');
     var propertyOozie = this.get('categoryConfigsAll').findProperty('displayName', 'Oozie
Database');
-    var propertyMetricsSink = this.get('categoryConfigsAll').findProperty('displayName',
'Metrics Sink Database');
     var propertyAppendTo2 = propertyHive ? propertyHive : propertyOozie;
     if (currentDB && existingDatabase) {
       if (handledProperties.contains(this.get('serviceConfig.name'))) {
@@ -960,8 +919,6 @@ App.CheckDBConnectionView = Ember.View.extend({
   hostNameProperty: function() {
     if (!/wizard/i.test(this.get('controller.name')) && this.get('parentView.service.serviceName')
=== 'HIVE') {
       return this.get('parentView.service.serviceName').toLowerCase() + '_hostname';
-    } else if (!/wizard/i.test(this.get('controller.name')) && this.get('parentView.service.serviceName')
=== 'HDFS') {
-      return  'sink.dbservername';
     }
     return '{0}_existing_{1}_host'.format(this.get('parentView.service.serviceName').toLowerCase(),
this.get('databaseName').toLowerCase());
   }.property('databaseName'),
@@ -972,7 +929,6 @@ App.CheckDBConnectionView = Ember.View.extend({
   /** @property {object} requiredProperties - properties that necessary for database connection
**/
   requiredProperties: function() {
     var propertiesMap = {
-      HDFS: ['sink.db.schema.name','sink.dblogin','sink.dbpassword','sink.jdbc.driver','sink.jdbc.url'],
       OOZIE: ['oozie.db.schema.name','oozie.service.JPAService.jdbc.username','oozie.service.JPAService.jdbc.password','oozie.service.JPAService.jdbc.driver','oozie.service.JPAService.jdbc.url'],
       HIVE: ['ambari.hive.db.schema.name','javax.jdo.option.ConnectionUserName','javax.jdo.option.ConnectionPassword','javax.jdo.option.ConnectionDriverName','javax.jdo.option.ConnectionURL']
     };

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index b49b07e..669cb58 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -937,11 +937,8 @@ describe('App.InstallerStep7Controller', function () {
         Em.Object.create({
           serviceName: 'HDFS',
           configs: [
-            {category: 'MetricsSink'},
-            {category: 'MetricsSink'},
             {category: 'NameNode'},
-            {category: 'NameNode'},
-            {category: 'MetricsSink'}
+            {category: 'NameNode'}
           ]
         }),
         Em.Object.create({serviceName: 's2'})]
@@ -969,11 +966,8 @@ describe('App.InstallerStep7Controller', function () {
         Em.Object.create({
           serviceName: 'HDFS',
           configs: [
-            {category: 'MetricsSink'},
-            {category: 'MetricsSink'},
-            {category: 'NameNode'},
             {category: 'NameNode'},
-            {category: 'MetricsSink'}
+            {category: 'NameNode'}
           ]
         }),
         Em.Object.create({serviceName: 's2'})]
@@ -985,7 +979,7 @@ describe('App.InstallerStep7Controller', function () {
       });
       installerStep7Controller.setStepConfigs([], []);
 
-      expect(installerStep7Controller.get('stepConfigs').findProperty('serviceName', 'HDFS').get('configs').length).to.equal(5);
+      expect(installerStep7Controller.get('stepConfigs').findProperty('serviceName', 'HDFS').get('configs').length).to.equal(2);
 
       s.restore();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/61f3c022/ambari-web/test/views/wizard/controls_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/controls_view_test.js b/ambari-web/test/views/wizard/controls_view_test.js
index 5cc7449..18ed797 100644
--- a/ambari-web/test/views/wizard/controls_view_test.js
+++ b/ambari-web/test/views/wizard/controls_view_test.js
@@ -102,10 +102,6 @@ describe('App.ServiceConfigRadioButtons', function () {
             value: 'db0'
           },
           {
-            name: 'sink.db.schema.name',
-            value: 'db1'
-          },
-          {
             name: 'oozie.db.schema.name',
             value: 'db2'
           }
@@ -117,10 +113,6 @@ describe('App.ServiceConfigRadioButtons', function () {
           value: 'db0'
         },
         {
-          serviceName: 'HDFS',
-          value: 'db1'
-        },
-        {
           serviceName: 'OOZIE',
           value: 'db2'
         }
@@ -176,18 +168,6 @@ describe('App.ServiceConfigRadioButtons', function () {
             value: 'h6'
           },
           {
-            name: 'sink_existing_mssql_server_host',
-            value: 'h7'
-          },
-          {
-            name: 'sink_existing_mssql_server_2_host',
-            value: 'h8'
-          },
-          {
-            name: 'sink.dbservername',
-            value: 'h9'
-          },
-          {
             name: 'oozie_ambari_host',
             value: 'h10'
           },
@@ -254,21 +234,6 @@ describe('App.ServiceConfigRadioButtons', function () {
           expected: 'h6'
         },
         {
-          serviceName: 'HDFS',
-          value: 'Existing MSSQL Server database with integrated authentication',
-          expected: 'h7'
-        },
-        {
-          serviceName: 'HDFS',
-          value: 'Existing MSSQL Server database with sql auth',
-          expected: 'h8'
-        },
-        {
-          serviceName: 'HDFS',
-          value: 'default case',
-          expected: 'h9'
-        },
-        {
           serviceName: 'OOZIE',
           value: 'New Derby Database',
           expected: 'h10'
@@ -346,12 +311,6 @@ describe('App.ServiceConfigRadioButtons', function () {
           }),
           Em.Object.create({
             name: 'oozie.service.JPAService.jdbc.password'
-          }),
-          Em.Object.create({
-            name: 'sink.dblogin'
-          }),
-          Em.Object.create({
-            name: 'sink.dbpassword'
           })
         ],
         parentView: Em.Object.create({
@@ -478,30 +437,11 @@ describe('App.ServiceConfigRadioButtons', function () {
           connectionUrlValue: 'jdbc:sqlserver://h11;databaseName=db11;integratedSecurity=true',
           dbClassValue: 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
           isAuthVisibleAndRequired: false
-        },
-        {
-          serviceName: 'HDFS',
-          serviceConfigValue: 'Existing MSSQL Server database with sql auth',
-          databaseName: 'db12',
-          hostName: 'h12',
-          connectionUrlValue: 'jdbc:sqlserver://h12;databaseName=db12',
-          dbClassValue: 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
-          isAuthVisibleAndRequired: true
-        },
-        {
-          serviceName: 'HDFS',
-          serviceConfigValue: 'Existing MSSQL Server database with integrated authentication',
-          databaseName: 'db13',
-          hostName: 'h13',
-          connectionUrlValue: 'jdbc:sqlserver://h13;databaseName=db13;integratedSecurity=true',
-          dbClassValue: 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
-          isAuthVisibleAndRequired: false
         }
       ],
       serviceAuthPropsMap = {
         HIVE: ['javax.jdo.option.ConnectionUserName', 'javax.jdo.option.ConnectionPassword'],
-        OOZIE: ['oozie.service.JPAService.jdbc.username', 'oozie.service.JPAService.jdbc.password'],
-        HDFS: ['sink.dblogin', 'sink.dbpassword']
+        OOZIE: ['oozie.service.JPAService.jdbc.username', 'oozie.service.JPAService.jdbc.password']
       };
 
     before(function () {
@@ -624,10 +564,6 @@ describe('App.CheckDBConnectionView', function () {
           value: 'h0'
         },
         {
-          serviceName: 'HDFS',
-          value: 'h1'
-        },
-        {
           serviceName: 'HIVE',
           value: 'h2'
         }
@@ -638,10 +574,6 @@ describe('App.CheckDBConnectionView', function () {
           value: 'h0'
         }),
         Em.Object.create({
-          name: 'hadoop_host',
-          value: 'h1'
-        }),
-        Em.Object.create({
           name: 'hive_ambari_host',
           value: 'h2'
         })


Mime
View raw message