ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-4271. YARN ATS: implement Install Wizard changes. (Denys Buzhor via akovalenko)
Date Tue, 21 Jan 2014 13:24:06 GMT
Updated Branches:
  refs/heads/trunk 5c9311e3c -> 85dd6783b


AMBARI-4271. YARN ATS: implement Install Wizard changes. (Denys Buzhor via akovalenko)


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

Branch: refs/heads/trunk
Commit: 85dd6783be44e52c90d414733923f27b97ebfb22
Parents: 5c9311e
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Tue Jan 21 15:22:01 2014 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Tue Jan 21 15:22:01 2014 +0200

----------------------------------------------------------------------
 .../app/controllers/wizard/step5_controller.js  |  7 +++++
 .../app/controllers/wizard/step8_controller.js  | 10 +++++--
 ambari-web/app/data/HDP2/global_properties.js   | 28 ++++++++++++++++++++
 ambari-web/app/data/review_configs.js           | 16 +++++++++++
 ambari-web/app/data/service_components.js       | 22 +++++++++++++++
 ambari-web/app/data/service_configs.js          |  1 +
 ambari-web/app/mappers/server_data_mapper.js    |  1 +
 ambari-web/app/models/host_component.js         |  1 +
 ambari-web/app/models/service_config.js         |  4 +++
 9 files changed, 88 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/controllers/wizard/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js
index d0623db..b1f362d 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -447,6 +447,13 @@ App.WizardStep5Controller = Em.Controller.extend({
         return this.getNagiosServer(noOfHosts);
       case 'HUE_SERVER':
         return this.getHueServer(noOfHosts);
+      case 'APP_TIMELINE_SERVER':
+        return this.getHostForComponent(noOfHosts, {
+          "3" : 1,
+          "6" : 1,
+          "31" : 1,
+          "else" : 2
+        }).host_name;
       case 'FALCON_SERVER':
         return this.getOozieServer(noOfHosts);
       case 'STORM_UI_SERVER':

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/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 23da6c7..56dcd5c 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -636,16 +636,22 @@ App.WizardStep8Controller = Em.Controller.extend({
   },
 
   loadYARN: function(mrObj){
+    var setComponentHost = function(component, componentName) {
+      component.set('component_value', this.get('content.masterComponentHosts').findProperty('component',
componentName).hostName);
+    }.bind(this);
     mrObj.get('service_components').forEach(function (_component) {
       switch (_component.get('display_name')) {
         case 'NodeManager':
           this.loadNMValue(_component);
           break;
         case 'ResourceManager':
-          _component.set('component_value', this.get('content.masterComponentHosts').findProperty('component',
'RESOURCEMANAGER').hostName);
+          setComponentHost(_component, 'RESOURCEMANAGER');
           break;
         case 'History Server':
-          _component.set('component_value', this.get('content.masterComponentHosts').findProperty('component',
'HISTORYSERVER').hostName);
+          setComponentHost(_component, 'HISTORYSERVER');
+          break;
+        case 'App Timeline Server':
+          setComponentHost(_component, 'APP_TIMELINE_SERVER');
           break;
       }
     }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/data/HDP2/global_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/global_properties.js b/ambari-web/app/data/HDP2/global_properties.js
index 79c8193..18c5ad1 100644
--- a/ambari-web/app/data/HDP2/global_properties.js
+++ b/ambari-web/app/data/HDP2/global_properties.js
@@ -331,6 +331,34 @@ module.exports =
     },
     {
       "id": "puppet var",
+      "name": "ats_host",
+      "displayName": "App Timeline Server",
+      "description": "Application Timeline Server Host",
+      "defaultValue": "",
+      "isOverridable": false,
+      "displayType": "masterHost",
+      "isRequiredByAgent": false,
+      "isVisible": App.supports.appTimelineServer, // @todo remove test mode check after
App Timeline service integration
+      "serviceName": "YARN",
+      "category": "AppTimelineServer",
+      "index": 0
+    },
+    {
+      "id": "puppet var",
+      "name": "ats_server_port",
+      "displayName": "Server port",
+      "description": "Application Timeline Server port",
+      "defaultValue": "9292", // @todo add correct value APP_TIMELINE_SERVER.port
+      "isOverridable": false,
+      "displayType": "int",
+      "isRequiredByAgent": true,
+      "isVisible": App.supports.appTimelineServer, // @todo remove test mode check after
App Timeline service integration
+      "serviceName": "YARN",
+      "category": "AppTimelineServer",
+      "index": 1
+    },
+    {
+      "id": "puppet var",
       "name": "resourcemanager_heapsize",
       "displayName": "ResourceManager Java heap size",
       "description": "Max heapsize for ResourceManager",

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/data/review_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/review_configs.js b/ambari-web/app/data/review_configs.js
index d70f5f5..abe9226 100644
--- a/ambari-web/app/data/review_configs.js
+++ b/ambari-web/app/data/review_configs.js
@@ -100,6 +100,11 @@ module.exports = [
             display_name: 'History Server',
             component_value: ''
           })
+          // @todo uncomment after Application Timeline Server API implementation
+//          Ember.Object.create({
+//            display_name: 'App Timeline Server',
+//            component_value: ''
+//          })
         ]
       }),
       Ember.Object.create({
@@ -253,3 +258,14 @@ module.exports = [
     ]
   }
 ];
+
+// @todo remove after Application Timeline Server API implementation
+if (App.supports.appTimelineServer) {
+  var yarnServiceComponents = module.exports.findProperty('config_name', 'services').config_value.findProperty('service_name','YARN').get('service_components');
+  yarnServiceComponents.push(
+    Ember.Object.create({
+      display_name: 'App Timeline Server',
+      component_value: ''
+    })
+  )
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/data/service_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_components.js b/ambari-web/app/data/service_components.js
index 0736f24..81edc99 100644
--- a/ambari-web/app/data/service_components.js
+++ b/ambari-web/app/data/service_components.js
@@ -122,6 +122,15 @@ module.exports = new Ember.Set([
     isClient: true,
     description: ''
   },
+  // @todo uncomment after Application Timeline Server API implementation
+//  {
+//    service_name: 'YARN',
+//    component_name: 'APP_TIMELINE_SERVER',
+//    display_name: 'App Timeline Server',
+//    isMaster: true,
+//    isClient: false,
+//    description: ''
+//  },
   {
     service_name: 'YARN',
     component_name: 'NODEMANAGER',
@@ -379,3 +388,16 @@ module.exports = new Ember.Set([
     description: 'Master component for STORM'
   }
 ]);
+
+// @todo remove after Application Timeline Server API implementation
+if (App.supports.appTimelineServer) {
+  var appTimelineServerObj = {
+    service_name: 'YARN',
+    component_name: 'APP_TIMELINE_SERVER',
+    display_name: 'App Timeline Server',
+    isMaster: true,
+    isClient: false,
+    description: ''
+  };
+  module.exports.push(appTimelineServerObj);
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/data/service_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_configs.js b/ambari-web/app/data/service_configs.js
index 845c197..fdd6dca 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -79,6 +79,7 @@ module.exports = [
     configCategories: [
       App.ServiceConfigCategory.create({ name: 'ResourceManager', displayName : 'Resource
Manager', hostComponentNames : ['RESOURCEMANAGER']}),
       App.ServiceConfigCategory.create({ name: 'NodeManager', displayName : 'Node Manager',
hostComponentNames : ['NODEMANAGER']}),
+      App.ServiceConfigCategory.create({ name: 'AppTimelineServer', displayName : 'Application
Timeline Server', hostComponentNames : ['APP_TIMELINE_SERVER']}),
       App.ServiceConfigCategory.create({ name: 'General', displayName : 'General'}),
       App.ServiceConfigCategory.create({ name: 'CapacityScheduler', displayName : 'Scheduler',
isCapacityScheduler : true, isCustomView: true, siteFileName: 'capacity-scheduler.xml', siteFileNames:
['capacity-scheduler.xml', 'mapred-queue-acls.xml'], canAddProperty: App.supports.capacitySchedulerUi}),
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'}),

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/mappers/server_data_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/server_data_mapper.js b/ambari-web/app/mappers/server_data_mapper.js
index 0ce6cf4..3977e5d 100644
--- a/ambari-web/app/mappers/server_data_mapper.js
+++ b/ambari-web/app/mappers/server_data_mapper.js
@@ -191,6 +191,7 @@ App.QuickDataMapper.componentServiceMap = function () {
     'RESOURCEMANAGER': 'YARN',
     'YARN_CLIENT': 'YARN',
     'NODEMANAGER': 'YARN',
+    'APP_TIMELINE_SERVER': 'YARN',
     'ZOOKEEPER_SERVER': 'ZOOKEEPER',
     'ZOOKEEPER_CLIENT': 'ZOOKEEPER',
     'HBASE_MASTER': 'HBASE',

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 17887ac..3c97531 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -83,6 +83,7 @@ App.HostComponent = DS.Model.extend({
       case 'LOGVIEWER_SERVER':
       case 'DRPC_SERVER':
       case 'RESOURCEMANAGER':
+      case 'APP_TIMELINE_SERVER':
         return true;
       default:
         return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/85dd6783/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 f673770..6d6a1c1 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -312,6 +312,10 @@ App.ServiceConfigProperty = Ember.Object.extend({
       case 'rm_host':
         this.set('value', masterComponentHostsInDB.findProperty('component', 'RESOURCEMANAGER').hostName);
         break;
+      case 'ats_host':
+        if (!App.supports.appTimelineServer) return; // @todo remove test mode check after
App Timeline service integration
+        this.set('value', masterComponentHostsInDB.findProperty('component', 'APP_TIMELINE_SERVER').hostName);
+        break;
       case 'yarn.resourcemanager.hostname':
         var rmHost = masterComponentHostsInDB.findProperty('component', 'RESOURCEMANAGER').hostName;
         this.set('defaultValue',rmHost);


Mime
View raw message