Bläddra i källkod

AMBARI-8002. WebHCat Server Migration option via Ambari (Szilard Nemethy via srimanth)

Srimanth Gunturi 10 år sedan
förälder
incheckning
96bcff5e37

+ 5 - 1
ambari-web/app/controllers/main/service/reassign/step4_controller.js

@@ -38,7 +38,8 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
     'JOBTRACKER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'],
     'RESOURCEMANAGER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'],
     'APP_TIMELINE_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM'],
-    'OOZIE_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM', 'HIVE']
+    'OOZIE_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM', 'HIVE'],
+    'WEBHCAT_SERVER': ['HDFS', 'ZOOKEEPER', 'HBASE', 'FLUME', 'SQOOP', 'STORM']
   },
 
   /**
@@ -412,6 +413,9 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
       case 'OOZIE_SERVER':
         urlParams.push('(type=oozie-site&tag=' + data.Clusters.desired_configs['oozie-site'].tag + ')');
         break;
+      case 'WEBHCAT_SERVER':
+        urlParams.push('(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag + ')');
+        break;
     }
     return urlParams;
   },

+ 5 - 0
ambari-web/app/controllers/wizard/step5_controller.js

@@ -727,6 +727,11 @@ App.WizardStep5Controller = Em.Controller.extend(App.BlueprintMixin, {
    * @method updateCoHosts
    */
   updateCoHosts: function () {
+    // reassign wizard has no co-host constraints
+    if (this.get('isReassignWizard')) {
+      return false;
+    }
+
     var components = App.StackServiceComponent.find().filterProperty('isOtherComponentCoHosted');
     var selectedServicesMasters = this.get('selectedServicesMasters');
     components.forEach(function (component) {

+ 1 - 1
ambari-web/app/models/stack_service_component.js

@@ -77,7 +77,7 @@ App.StackServiceComponent = DS.Model.extend({
 
   /** @property {Boolean} isReassignable - component supports reassign action **/
   isReassignable: function() {
-    return ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER'].contains(this.get('componentName'));
+    return ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'OOZIE_SERVER', 'WEBHCAT_SERVER'].contains(this.get('componentName'));
   }.property('componentName'),
 
   /** @property {Boolean} isRollinRestartAllowed - component supports rolling restart action **/

+ 9 - 2
ambari-web/test/controllers/main/service/reassign/step4_controller_test.js

@@ -481,6 +481,12 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
         result: [
           "(type=oozie-site&tag=6)"
         ]
+      },
+      {
+        componentName: 'WEBHCAT_SERVER',
+        result: [
+          "(type=webhcat-site&tag=7)"
+        ]
       }
     ];
 
@@ -492,7 +498,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
           'hbase-site': {tag: 3},
           'mapred-site': {tag: 4},
           'yarn-site': {tag: 5},
-          'oozie-site': {tag: 6}
+          'oozie-site': {tag: 6},
+          'webhcat-site': {tag: 7}
         }
       }
     };
@@ -1184,4 +1191,4 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
     });
 
   });
-});
+});