incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-2782. Hadoop2 stack install should merge YARN, MR2 options. (onechiporenko)
Date Wed, 31 Jul 2013 17:48:59 GMT
Updated Branches:
  refs/heads/trunk 14ff542d1 -> 37eb38256


AMBARI-2782. Hadoop2 stack install should merge YARN,MR2 options. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 37eb38256ae2ec856b92555d0d38fff1b6011ad9
Parents: 14ff542
Author: Oleg Nechiporenko <cv_github@yahoo.com>
Authored: Wed Jul 31 20:47:52 2013 +0300
Committer: Oleg Nechiporenko <cv_github@yahoo.com>
Committed: Wed Jul 31 20:48:50 2013 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step4_controller.js      |  8 ++++++--
 .../app/controllers/wizard/step8_controller.js      | 11 +++--------
 ambari-web/app/data/review_configs.js               | 16 +++++-----------
 ambari-web/app/data/services.js                     |  3 ++-
 ambari-web/test/installer/step4_test.js             | 12 +++++++++++-
 5 files changed, 27 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37eb3825/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 25e6285..a61a91b 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -51,15 +51,19 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     var hive = this.findProperty('serviceName', 'HIVE');
     var hcatalog = this.findProperty('serviceName', 'HCATALOG');
     var webhcat = this.findProperty('serviceName', 'WEBHCAT');
+    var yarn = this.findProperty('serviceName', 'YARN');
+    var mapreduce2 = this.findProperty('serviceName', 'MAPREDUCE2');
 
     // prevent against getting error when not all elements have been loaded yet
-    if (hbase && zookeeper && hive && hcatalog && webhcat)
{
+    if (hbase && zookeeper && hive && hcatalog && webhcat
&& yarn && mapreduce2) {
       if (stringUtils.compareVersions(App.get('currentStackVersionNumber'), "2.0") === -1)
{
         zookeeper.set('isSelected', hbase.get('isSelected') || hive.get('isSelected'));
-      }else{
+      }
+      else {
         if (!zookeeper.get('isSelected')) {
           zookeeper.set('isSelected', hbase.get('isSelected'));
         }
+        mapreduce2.set('isSelected', yarn.get('isSelected'));
       }
       hcatalog.set('isSelected', hive.get('isSelected'));
       webhcat.set('isSelected', hive.get('isSelected'));

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37eb3825/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 57e41e8..f44bb89 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -552,6 +552,9 @@ App.WizardStep8Controller = Em.Controller.extend({
         case 'Resource Manager':
           _component.set('component_value', this.get('content.masterComponentHosts').findProperty('component',
'RESOURCEMANAGER').hostName);
           break;
+        case 'History Server':
+          _component.set('component_value', this.get('content.masterComponentHosts').findProperty('component',
'HISTORYSERVER').hostName);
+          break;
       }
     }, this);
     this.get('services').pushObject(mrObj);
@@ -570,14 +573,6 @@ App.WizardStep8Controller = Em.Controller.extend({
   loadTtValue: function (ttComponent) {
     var ttHosts = this.get('content.slaveComponentHosts').findProperty('displayName', 'TaskTracker');
     var totalTtHosts = ttHosts.hosts.length;
-    /* var totalGroups = this.get('slaveComponentConfig.components').findProperty('componentName',
'TASKTRACKER').groups.length;
-     var groupLabel;
-     if (totalGroups == 1) {
-     groupLabel = 'group';
-     } else {
-     groupLabel = 'groups';
-     }
-     */
     ttComponent.set('component_value', totalTtHosts + Em.I18n.t('installer.step8.hosts'));
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37eb3825/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 cdf2de6..b9b044c 100644
--- a/ambari-web/app/data/review_configs.js
+++ b/ambari-web/app/data/review_configs.js
@@ -85,18 +85,8 @@ module.exports = [
         ]
       }),
       Ember.Object.create({
-        service_name: 'MAPREDUCE2',
-        display_name: 'MapReduce 2',
-        service_components: [
-          Ember.Object.create({
-            display_name: 'History Server',
-            component_value: ''
-          })
-        ]
-      }),
-      Ember.Object.create({
         service_name: 'YARN',
-        display_name: 'YARN',
+        display_name: 'YARN + MapReduce2',
         service_components: [
           Ember.Object.create({
             display_name: 'Node Manager',
@@ -105,6 +95,10 @@ module.exports = [
           Ember.Object.create({
             display_name: 'Resource Manager',
             component_value: ''
+          }),
+          Ember.Object.create({
+            display_name: 'History Server',
+            component_value: ''
           })
         ]
       }),

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37eb3825/ambari-web/app/data/services.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/services.js b/ambari-web/app/data/services.js
index 20d5dd1..19644a8 100644
--- a/ambari-web/app/data/services.js
+++ b/ambari-web/app/data/services.js
@@ -49,11 +49,12 @@ module.exports = [
     isDisabled: false,
     isSelected: true,
     canBeSelected: true,
+    isHidden: true,
     description: Em.I18n.t('services.mapreduce2.description')
   },
   {
     serviceName: 'YARN',
-    displayName: 'YARN',
+    displayName: 'YARN + MapReduce2',
     isDisabled: false,
     isSelected: true,
     canBeSelected: true,

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37eb3825/ambari-web/test/installer/step4_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/installer/step4_test.js b/ambari-web/test/installer/step4_test.js
index fb47ae5..1d39dab 100644
--- a/ambari-web/test/installer/step4_test.js
+++ b/ambari-web/test/installer/step4_test.js
@@ -23,7 +23,7 @@ require('controllers/wizard/step4_controller');
 describe('App.WizardStep4Controller', function () {
 
   var services = [
-    'HDFS', 'MAPREDUCE', 'NAGIOS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER',
'HCATALOG', 'WEBHCAT'
+    'HDFS', 'MAPREDUCE', 'NAGIOS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER',
'HCATALOG', 'WEBHCAT', 'YARN', 'MAPREDUCE2'
   ]
 
   var controller = App.WizardStep4Controller.create();
@@ -82,6 +82,16 @@ describe('App.WizardStep4Controller', function () {
       expect(controller.findProperty('serviceName', 'HCATALOG').get('isSelected')).to.equal(true);
       expect(controller.findProperty('serviceName', 'WEBHCAT').get('isSelected')).to.equal(true);
     })
+    it('should set MapReduce2 isSelected property like in Yarn', function () {
+      App.set('currentStackVersion', 'HDP-2.0.1');
+      App.set('defaultStackVersion', 'HDP-2.0.1');
+      controller.setEach('isSelected', false);
+      controller.findProperty('serviceName', 'YARN').set('isSelected', true);
+      controller.checkDependencies();
+      expect(controller.findProperty('serviceName', 'MAPREDUCE2').get('isSelected')).to.equal(true);
+      App.set('currentStackVersion', 'HDP-1.2.2');
+      App.set('defaultStackVersion', 'HDP-1.2.2');
+    })
   })
 
   describe('#selectAll()', function () {


Mime
View raw message