Repository: ambari
Updated Branches:
  refs/heads/trunk 744697576 -> 1a270b81c


AMBARI-8708. Minor UI changes for enabling AMS (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1a270b81cc698af98e0a016e8caec0a3aa6478a0
Parents: 7446975
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Dec 15 14:04:04 2014 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Dec 15 14:04:04 2014 +0200

----------------------------------------------------------------------
 .../app/controllers/wizard/step4_controller.js  |  48 +----
 ambari-web/app/data/HDP2/site_properties.js     | 199 +++++++++++++++++++
 ambari-web/app/models/stack_service.js          |   8 +-
 .../test/controllers/wizard/step4_test.js       |  27 ++-
 4 files changed, 220 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a270b81/ambari-web/app/controllers/wizard/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step4_controller.js 
b/ambari-web/app/controllers/wizard/step4_controller.js
index 3a72854..3f45014 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -98,35 +98,6 @@ App.WizardStep4Controller = Em.ArrayController.extend({
   },
 
   /**
-   * Check if the stack definition has any monitoring service (alerting, 
metrics services) that has not been selected
-   * @return {bool}
-   * @method isMonitoringServiceNotSelected
-   */
-  isMonitoringServiceNotSelected: function () {
-    var stackMonitoringServices = 
this.filterProperty('isMonitoringService',true);
-    return stackMonitoringServices.length && 
stackMonitoringServices.someProperty('isSelected',false);
-  },
-
-  /**
-   * Check whether user turned on monitoring service and go to next step
-   * @method validateMonitoring
-   */
-  serviceMonitoringValidation: function () {
-    var monitoringServices =  this.filterProperty('isMonitoringService', true);
-    var notSelectedService = monitoringServices.filterProperty('isSelected', 
false);
-    if (!!notSelectedService.length) {
-      notSelectedService = 
stringUtils.getFormattedStringFromArray(notSelectedService.mapProperty('displayNameOnSelectServicePage'));
-      monitoringServices = 
stringUtils.getFormattedStringFromArray(monitoringServices.mapProperty('displayNameOnSelectServicePage'));
-      this.addValidationError({
-        id: 'monitoringCheck',
-        type: 'WARNING',
-        callback: this.monitoringCheckPopup,
-        callbackParams: [notSelectedService, monitoringServices]
-      });
-    }
-  },
-
-  /**
    * Onclick handler for <code>Next</code> button.
    * @method submit
    */
@@ -152,7 +123,6 @@ App.WizardStep4Controller = Em.ArrayController.extend({
   validate: function() {
     this.serviceDependencyValidation();
     this.fileSystemServiceValidation();
-    this.serviceMonitoringValidation();
     if (!!this.get('errorStack').filterProperty('isShown', false).length) {
       this.showError(this.get('errorStack').findProperty('isShown', false));
       return false;
@@ -364,22 +334,6 @@ App.WizardStep4Controller = Em.ArrayController.extend({
         this.hide();
       }
     });
-  },
-
-  /**
-   * Show popup with info about not selected (but should be selected) services
-   * @return {App.ModalPopup}
-   * @method monitoringCheckPopup
-   */
-  monitoringCheckPopup: function 
(notSelectedServiceNames,monitoringServicesNames) {
-    var self = this;
-    return App.ModalPopup.show({
-      header: Em.I18n.t('installer.step4.monitoringCheck.popup.header'),
-      body: 
Em.I18n.t('installer.step4.monitoringCheck.popup.body').format(notSelectedServiceNames,monitoringServicesNames),
-      onPrimary: function () {
-        self.onPrimaryPopupCallback();
-        this.hide();
-      }
-    });
   }
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a270b81/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 835d1c0..b139df2 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -4563,6 +4563,205 @@ module.exports =
       "serviceName": "MISC",
       "category": "Notifications",
       "rowStyleClass": "indent-1"
+    },
+  
/************************************************AMS******************************************/
+    {
+      "id": "site property",
+      "name": "timeline.metrics.service.operation.mode",
+      "displayName": "timeline.metrics.service.operation.mode",
+      "description":  "\n      Service Operation modes:\n      1) embedded: 
Metrics stored on local FS, HBase in Standalone mode\n      2) distributed: 
HBase daemons writing to HDFS\n      3) external: External HBase storage 
backend\n    ",
+      "defaultValue": "embedded",
+      "displayType": "string",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "General"
+    },
+    {
+      "id": "site property",
+      "name" : "timeline.metrics.aggregator.checkpoint.dir",
+      "displayName": "timeline.metrics.aggregator.checkpoint.dir",
+      "description":  "\n      Directory to store aggregator checkpoints. 
Change to a permanent\n      location so that checkpoint ar not lost.\n    ",
+      "defaultValue": "/tmp",
+      "displayType": "directory",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": 
"timeline.metrics.cluster.aggregator.hourly.checkpointCutOffMultiplier",
+      "displayName": 
"timeline.metrics.cluster.aggregator.hourly.checkpointCutOffMultiplier",
+      "description":  "\n      Multiplier value * interval = Max allowed 
checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max 
allowed checkpoint delay,\n      the checkpoint will be discarded by the 
aggregator.\n    ",
+      "defaultValue": "2",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.cluster.aggregator.hourly.disabled",
+      "displayName": "timeline.metrics.cluster.aggregator.hourly.disabled",
+      "description":  "\n      Disable cluster based hourly aggregations.\n    
",
+      "defaultValue": "false",
+      "displayType": "string",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.cluster.aggregator.hourly.interval",
+      "displayName": "timeline.metrics.cluster.aggregator.hourly.interval",
+      "description":  "\n      Time in seconds to sleep for the hourly 
resolution cluster wide\n      aggregator. Default is 1 hour.\n    ",
+      "defaultValue": "3600",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": 
"timeline.metrics.cluster.aggregator.minute.checkpointCutOffMultiplier",
+      "displayName": 
"timeline.metrics.cluster.aggregator.minute.checkpointCutOffMultiplier",
+      "description":  "\n      Multiplier value * interval = Max allowed 
checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max 
allowed checkpoint delay,\n      the checkpoint will be discarded by the 
aggregator.\n    ",
+      "defaultValue": "2",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.cluster.aggregator.minute.disabled",
+      "displayName": "timeline.metrics.cluster.aggregator.minute.disabled",
+      "description":  "\n      Disable cluster based minute aggregations.\n    
",
+      "defaultValue": "false",
+      "displayType": "string",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.cluster.aggregator.minute.interval",
+      "displayName": "timeline.metrics.cluster.aggregator.minute.interval",
+      "description":  "\n      Time in seconds to sleep for the minute 
resolution cluster wide\n      aggregator. Default resolution is 2 minutes.\n   
 ",
+      "defaultValue": "120",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.cluster.aggregator.minute.timeslice.interval",
+      "displayName": 
"timeline.metrics.cluster.aggregator.minute.timeslice.interval",
+      "description":  "\n      Lowest resolution of desired data for cluster 
level minute aggregates.\n    ",
+      "defaultValue": "15",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": 
"timeline.metrics.host.aggregator.hourly.checkpointCutOffMultiplier",
+      "displayName": 
"timeline.metrics.host.aggregator.hourly.checkpointCutOffMultiplier",
+      "description":  "\n      Multiplier value * interval = Max allowed 
checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max 
allowed checkpoint delay,\n      the checkpoint will be discarded by the 
aggregator.\n    ",
+      "defaultValue": "2",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.host.aggregator.hourly.disabled",
+      "displayName": "timeline.metrics.host.aggregator.hourly.disabled",
+      "description":  "\n      Disable host based hourly aggregations.\n    ",
+      "defaultValue": "false",
+      "displayType": "string",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.host.aggregator.hourly.interval",
+      "displayName": "timeline.metrics.host.aggregator.hourly.interval",
+      "description":  "\n      Time in seconds to sleep for the hourly 
resolution host based\n      aggregator. Default resolution is 1 hour.\n    ",
+      "defaultValue": "3600",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": 
"timeline.metrics.host.aggregator.minute.checkpointCutOffMultiplier",
+      "displayName": 
"timeline.metrics.host.aggregator.minute.checkpointCutOffMultiplier",
+      "description":  "\n      Multiplier value * interval = Max allowed 
checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max 
allowed checkpoint delay,\n      the checkpoint will be discarded by the 
aggregator.\n    ",
+      "defaultValue": "2",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.host.aggregator.minute.disabled",
+      "displayName": "timeline.metrics.host.aggregator.minute.disabled",
+      "description":  "\n      Disable host based minute aggregations.\n    ",
+      "defaultValue": "false",
+      "displayType": "string",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.host.aggregator.minute.interval",
+      "displayName": "timeline.metrics.host.aggregator.minute.interval",
+      "description":  "\n      Time in seconds to sleep for the minute 
resolution host based\n      aggregator. Default resolution is 5 minutes.\n    
",
+      "defaultValue": "300",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.service.checkpointDelay",
+      "displayName": "timeline.metrics.service.checkpointDelay",
+      "description":  "\n      Time in seconds to sleep on the first run or 
when the checkpoint is\n      too old.\n    ",
+      "defaultValue": "120",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.service.default.result.limit",
+      "displayName": "timeline.metrics.service.default.result.limit",
+      "description":  "\n      Max result limit on number of rows returned. 
Calculated as follows:\n      4 aggregate metrics/min * 60 * 24: Retrieve 
aggregate data for 1 day.\n    ",
+      "defaultValue": "5760",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
+    },
+    {
+      "id": "site property",
+      "name": "timeline.metrics.service.resultset.fetchSize",
+      "displayName": "timeline.metrics.service.resultset.fetchSize",
+      "description":  "\n      JDBC resultset prefect size for aggregator 
queries.\n    ",
+      "defaultValue": "2000",
+      "displayType": "int",
+      "serviceName": "AMS",
+      "filename": "ams-site.xml",
+      "category": "MetricCollector"
     }
   ]
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a270b81/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 3b2b42e..087b208 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -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"];
+      var pattern = ["MetricsSink", "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);
@@ -341,6 +341,12 @@ App.StackService.configCategories = function () {
         App.ServiceConfigCategory.create({ name: 'General', displayName: 
'General'})
       ]);
       break;
+    case 'AMS':
+      serviceConfigCategories.pushObjects([
+        App.ServiceConfigCategory.create({ name: 'MetricCollector', 
displayName: 'Metric Collector'}),
+        App.ServiceConfigCategory.create({ name: 'General', displayName: 
'General'})
+      ]);
+      break;
     case 'PIG':
       break;
     case 'SQOOP':

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a270b81/ambari-web/test/controllers/wizard/step4_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step4_test.js 
b/ambari-web/test/controllers/wizard/step4_test.js
index a8ec9b9..133512e 100644
--- a/ambari-web/test/controllers/wizard/step4_test.js
+++ b/ambari-web/test/controllers/wizard/step4_test.js
@@ -258,23 +258,23 @@ describe('App.WizardStep4Controller', function () {
     var tests = [
       {
         services: ['HDFS','ZOOKEEPER'],
-        errorsExpected: ['monitoringCheck']
+        errorsExpected: []
       },
       {
         services: ['ZOOKEEPER'],
-        errorsExpected: ['monitoringCheck']
+        errorsExpected: []
       },
       {
         services: ['HDFS'],
-        errorsExpected: ['serviceCheck_ZOOKEEPER', 'monitoringCheck']
+        errorsExpected: ['serviceCheck_ZOOKEEPER']
       },
       {
         services: ['HDFS', 'TEZ', 'ZOOKEEPER'],
-        errorsExpected: ['serviceCheck_YARN', 'monitoringCheck']
+        errorsExpected: ['serviceCheck_YARN']
       },
       {
         services: ['HDFS', 'ZOOKEEPER', 'FALCON', 'NAGIOS'],
-        errorsExpected: ['serviceCheck_OOZIE', 'monitoringCheck']
+        errorsExpected: ['serviceCheck_OOZIE']
       },
       {
         services: ['HDFS', 'ZOOKEEPER', 'GANGLIA', 'NAGIOS', 'HIVE'],
@@ -282,7 +282,7 @@ describe('App.WizardStep4Controller', function () {
       },
       {
         services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE'],
-        errorsExpected: ['serviceCheck_YARN', 'multipleDFS', 'monitoringCheck']
+        errorsExpected: ['serviceCheck_YARN', 'multipleDFS']
       },
       {
         services: ['HDFS','ZOOKEEPER', 'NAGIOS', 'GANGLIA'],
@@ -307,18 +307,18 @@ describe('App.WizardStep4Controller', function () {
     var tests = [
       {
         services: ['HDFS','ZOOKEEPER'],
-        confirmPopupCount: 1,
-        errorsExpected: ['monitoringCheck']
+        confirmPopupCount: 0,
+        errorsExpected: []
       },
       {
         services: ['ZOOKEEPER'],
-        confirmPopupCount: 1,
-        errorsExpected: ['monitoringCheck']
+        confirmPopupCount: 0,
+        errorsExpected: []
       },
       {
         services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE'],
-        confirmPopupCount: 3,
-        errorsExpected: ['serviceCheck_YARN', 'serviceCheck_TEZ', 
'multipleDFS', 'monitoringCheck']
+        confirmPopupCount: 2,
+        errorsExpected: ['serviceCheck_YARN', 'serviceCheck_TEZ', 
'multipleDFS']
       },
       {
         services: ['HDFS','ZOOKEEPER', 'NAGIOS', 'GANGLIA'],
@@ -349,8 +349,7 @@ describe('App.WizardStep4Controller', function () {
         var runValidations = function() {
           c.serviceDependencyValidation();
           c.fileSystemServiceValidation();
-          c.serviceMonitoringValidation();
-        }
+        };
 
         c.set('content', generateSelectedServicesContent(test.services));
         runValidations();

Reply via email to