ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mithm...@apache.org
Subject ambari git commit: AMBARI-15256: User should be able to remove HAWQ Standby via UI (Alexander Denissov via mithmatt)
Date Thu, 03 Mar 2016 09:02:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2ff6c32d3 -> f6ecddf69


AMBARI-15256: User should be able to remove HAWQ Standby via UI (Alexander Denissov via mithmatt)


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

Branch: refs/heads/trunk
Commit: f6ecddf69f615d800a0146b730a44ba075013760
Parents: 2ff6c32
Author: Matt <mmathew@pivotal.io>
Authored: Thu Mar 3 01:01:07 2016 -0800
Committer: Matt <mmathew@pivotal.io>
Committed: Thu Mar 3 01:01:07 2016 -0800

----------------------------------------------------------------------
 .../common-services/HAWQ/2.0.0/metainfo.xml     |   8 +
 .../HAWQ/2.0.0/package/scripts/hawqmaster.py    |   5 +
 ambari-web/app/assets/test/tests.js             |   1 +
 ambari-web/app/controllers.js                   |   4 +
 .../hawq/removeStandby/step1_controller.js      |  23 +++
 .../hawq/removeStandby/step2_controller.js      |  46 +++++
 .../hawq/removeStandby/step3_controller.js      | 110 +++++++++++
 .../hawq/removeStandby/wizard_controller.js     | 128 +++++++++++++
 .../main/admin/highAvailability_controller.js   |   9 +
 ambari-web/app/controllers/main/service/item.js |   5 +
 ambari-web/app/data/controller_route.js         |   4 +
 ambari-web/app/messages.js                      |  29 +++
 ambari-web/app/models/host_component.js         |   9 +
 ambari-web/app/routes/main.js                   |   2 +
 .../app/routes/remove_hawq_standby_routes.js    | 190 +++++++++++++++++++
 .../hawq/removeStandby/step1.hbs                |  28 +++
 .../hawq/removeStandby/step2.hbs                |  43 +++++
 .../hawq/removeStandby/step3.hbs                |  18 ++
 .../hawq/removeStandby/wizard.hbs               |  44 +++++
 ambari-web/app/utils/db.js                      |   1 +
 ambari-web/app/views.js                         |   4 +
 .../hawq/removeStandby/step1_view.js            |  26 +++
 .../hawq/removeStandby/step2_view.js            |  26 +++
 .../hawq/removeStandby/step3_view.js            |  36 ++++
 .../hawq/removeStandby/wizard_view.js           |  74 ++++++++
 .../main/host/details/host_component_view.js    |  20 +-
 ambari-web/app/views/main/service/item.js       |   2 +-
 .../hawq/removeStandby/step2_controller_test.js |  52 +++++
 28 files changed, 937 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
index b77eb34..a25e9bf 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
@@ -62,6 +62,14 @@
                 <timeout>1200</timeout>
               </commandScript>
             </customCommand>
+            <customCommand>
+              <name>REMOVE_HAWQ_STANDBY</name>
+              <commandScript>
+                <script>scripts/hawqmaster.py</script>
+                <scriptType>PYTHON</scriptType>
+                <timeout>1200</timeout>
+              </commandScript>
+            </customCommand>
           </customCommands>
           <dependencies>
             <dependency>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py
index 3309561..8c42848 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py
@@ -28,6 +28,7 @@ except ImportError:
 import master_helper
 import common
 import hawq_constants
+import utils
 
 class HawqMaster(Script):
   """
@@ -73,5 +74,9 @@ class HawqMaster(Script):
             user=hawq_constants.hawq_user,
             timeout=hawq_constants.default_exec_timeout)
 
+  def remove_hawq_standby(self, env):
+    Logger.info("Removing HAWQ Standby Master ...")
+    utils.exec_hawq_operation(hawq_constants.INIT, "{0} -a -v -r".format(hawq_constants.STANDBY))
+
 if __name__ == "__main__":
   HawqMaster().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index a875656..efa197e 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -72,6 +72,7 @@ var files = [
   'test/controllers/main/admin/highAvailability/nameNode/step4_controller_test',
   'test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test',
   'test/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller_test',
+  'test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test',
   'test/controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller_test',
   'test/controllers/main/dashboard/config_history_controller_test',
   'test/controllers/main/charts/heatmap_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index c9214f8..6235112 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -60,6 +60,10 @@ require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controlle
 require('controllers/main/admin/highAvailability/hawq/addStandby/step2_controller');
 require('controllers/main/admin/highAvailability/hawq/addStandby/step3_controller');
 require('controllers/main/admin/highAvailability/hawq/addStandby/step4_controller');
+require('controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller');
+require('controllers/main/admin/highAvailability/hawq/removeStandby/step1_controller');
+require('controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller');
+require('controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller');
 require('controllers/main/admin/highAvailability/hawq/activateStandby/wizard_controller');
 require('controllers/main/admin/highAvailability/hawq/activateStandby/step1_controller');
 require('controllers/main/admin/highAvailability/hawq/activateStandby/step2_controller');

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step1_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step1_controller.js
new file mode 100644
index 0000000..6d7d4bd
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step1_controller.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardStep1Controller = Em.Controller.extend({
+  name: "removeHawqStandbyWizardStep1Controller"
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller.js
new file mode 100644
index 0000000..6ccb330
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller.js
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @typedef {object} hawqRemoveStandbyConfigDependencies
+ */
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardStep2Controller = Em.Controller.extend({
+  name: "removeHawqStandbyWizardStep2Controller",
+
+  selectedService: null,
+
+  versionLoaded: true,
+
+  hideDependenciesInfoBar: true,
+
+  isLoaded: true,
+
+  isSubmitDisabled: Em.computed.not('isLoaded'),
+
+  submit: function () {
+    if (!this.get('isSubmitDisabled')) {
+      App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
+        App.router.send("next");
+      });
+    }
+  }
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller.js
new file mode 100644
index 0000000..d612821
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/step3_controller.js
@@ -0,0 +1,110 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+require('controllers/main/admin/serviceAccounts_controller');
+
+App.RemoveHawqStandbyWizardStep3Controller = App.HighAvailabilityProgressPageController.extend(App.WizardEnableDone, {
+
+  name: "removeHawqStandbyWizardStep3Controller",
+
+  clusterDeployState: 'REMOVE_HAWQ_STANDBY',
+
+  hawqRemoveStandbyCustomCommand: "REMOVE_HAWQ_STANDBY",
+
+  hawqServiceName: "HAWQ",
+
+  hawqMasterComponentName: "HAWQMASTER",
+
+  hawqStandbyComponentName: "HAWQSTANDBY",
+
+  commands: ['removeStandby', 'stopRequiredServices', 'reconfigureHAWQ', 'deleteHawqStandbyComponent', 'startRequiredServices'],
+
+  tasksMessagesPrefix: 'admin.removeHawqStandby.wizard.step',
+
+  removeStandby: function () {
+    App.ajax.send({
+      name : 'service.item.executeCustomCommand',
+      sender: this,
+      data : {
+        command : this.hawqRemoveStandbyCustomCommand,
+        context : Em.I18n.t('admin.removeHawqStandby.wizard.step3.removeHawqStandbyCommand.context'),
+        hosts : this.get('content.hawqHosts.hawqMaster'),
+        serviceName : this.hawqServiceName,
+        componentName : this.hawqMasterComponentName
+      },
+      success: 'startPolling',
+      error: 'onTaskError'
+    });
+  },
+
+  stopRequiredServices: function () {
+    this.stopServices([this.hawqServiceName], true);
+  },
+
+  reconfigureHAWQ: function () {
+    App.ajax.send({
+      name: 'config.tags',
+      sender: this,
+      success: 'onLoadHawqConfigsTags',
+      error: 'onTaskError'
+    });
+  },
+
+  onLoadHawqConfigsTags: function (data) {
+    App.ajax.send({
+      name: 'reassign.load_configs',
+      sender: this,
+      data: {
+        urlParams: '(type=hawq-site&tag=' + data.Clusters.desired_configs['hawq-site'].tag + ')',
+        type: 'hawq-site'
+      },
+      success: 'onLoadConfigs',
+      error: 'onTaskError'
+    });
+  },
+
+  onLoadConfigs: function (data, opt, params) {
+    delete data.items[0].properties['hawq_standby_address_host'];
+
+    var configData = this.reconfigureSites([params.type], data, Em.I18n.t('admin.removeHawqStandby.wizard.step3.save.configuration.note').format(App.format.role('HAWQSTANDBY')));
+
+    App.ajax.send({
+      name: 'common.service.configurations',
+      sender: this,
+      data: {
+        desired_config: configData
+      },
+      success: 'onSaveConfigs',
+      error: 'onTaskError'
+    });
+  },
+  onSaveConfigs: function () {
+    this.onTaskCompleted();
+  },
+
+  deleteHawqStandbyComponent: function () {
+    var hostName = this.get('content.hawqHosts.hawqStandby');
+    this.deleteComponent(this.hawqStandbyComponentName, hostName);
+  },
+
+  startRequiredServices: function () {
+    this.startServices(true, [this.hawqServiceName], true);
+  }
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller.js
new file mode 100644
index 0000000..0797eed
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/removeStandby/wizard_controller.js
@@ -0,0 +1,128 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardController = App.WizardController.extend({
+
+  name: 'removeHawqStandbyWizardController',
+
+  totalSteps: 3,
+
+  /**
+   * @type {string}
+   */
+  displayName: Em.I18n.t('admin.removeHawqStandby.wizard.header'),
+
+  isFinished: false,
+
+  content: Em.Object.create({
+    controllerName: 'removeHawqStandbyWizardController'
+  }),
+
+  init: function () {
+    this._super();
+    this.clearStep();
+  },
+
+  clearStep: function () {
+    this.set('isFinished', false);
+  },
+
+  setCurrentStep: function (currentStep, completed) {
+    this._super(currentStep, completed);
+    App.clusterStatus.setClusterStatus({
+      clusterName: this.get('content.cluster.name'),
+      wizardControllerName: 'removeHawqStandbyWizardController',
+      localdb: App.db.data
+    });
+  },
+
+  /**
+   * Save hosts for Hawq Master and Hawq Standby to local db<code>controller.content</code>
+   * @param hawqHosts
+   */
+  saveHawqHosts: function (hawqHosts) {
+    this.set('content.hawqHosts', hawqHosts);
+    this.setDBProperty('hawqHosts', hawqHosts);
+  },
+
+  /**
+   * Load hosts for Hawq Master and Hawq Standby from local db to <code>controller.content</code>
+   */
+  loadHawqHosts: function() {
+    var hawqHosts = this.getDBProperty('hawqHosts');
+    this.set('content.hawqHosts', hawqHosts);
+  },
+
+  /**
+   * Save configs to load and apply them on Configure Components step
+   * @param configs
+   */
+  saveConfigs: function (configs) {
+    this.set('content.configs', configs);
+    this.setDBProperty('configs', configs);
+  },
+
+  /**
+   * Load configs to apply them on Configure Components step
+   */
+  loadConfigs: function() {
+    var configs = this.getDBProperty('configs');
+    this.set('content.configs', configs);
+  },
+
+  /**
+   * Load data for all steps until <code>current step</code>
+   */
+  loadAllPriorSteps: function () {
+    var step = this.get('currentStep');
+    switch (step) {
+      case '3':
+        this.loadTasksStatuses();
+        this.loadTasksRequestIds();
+        this.loadRequestIds();
+        this.loadConfigs();
+      case '2':
+        this.loadHawqHosts();
+        this.loadServicesFromServer();
+        this.loadMasterComponentHosts();
+      case '1':
+        this.load('cluster');
+    }
+  },
+
+  /**
+   * Remove all loaded data.
+   */
+  clearAllSteps: function () {
+    this.clearInstallOptions();
+    // clear temporary information stored during the install
+    this.set('content.cluster', this.getCluster());
+  },
+
+  /**
+   * Clear all temporary data
+   */
+  finish: function () {
+    this.resetDbNamespace();
+    App.router.get('updateController').updateAll();
+    this.set('isFinished', true);
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 0bdd09c..1115a69 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -90,6 +90,15 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
   },
 
   /**
+   * remove Hawq Standby
+   * @return {Boolean}
+   */
+  removeHawqStandby: function () {
+    App.router.transitionTo('main.services.removeHawqStandby');
+    return true;
+  },
+
+  /**
    * activate Hawq Standby
    * @return {Boolean}
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index e26a884..92d4d79 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -882,6 +882,11 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
     highAvailabilityController.addHawqStandby();
   },
 
+  removeHawqStandby: function() {
+    var highAvailabilityController = App.router.get('mainAdminHighAvailabilityController');
+    highAvailabilityController.removeHawqStandby();
+  },
+
   activateHawqStandby: function() {
     var highAvailabilityController = App.router.get('mainAdminHighAvailabilityController');
     highAvailabilityController.activateHawqStandby();

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/data/controller_route.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/controller_route.js b/ambari-web/app/data/controller_route.js
index d254edb..5f7c499 100644
--- a/ambari-web/app/data/controller_route.js
+++ b/ambari-web/app/data/controller_route.js
@@ -54,6 +54,10 @@ module.exports = [
     route: 'main.services.addHawqStandby'
   },
   {
+    wizardControllerName: App.router.get('removeHawqStandbyWizardController.name'),
+    route: 'main.services.removeHawqStandby'
+  },
+  {
     wizardControllerName: App.router.get('activateHawqStandbyWizardController.name'),
     route: 'main.services.activateHawqStandby'
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a12b729..7aa38e4 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2924,6 +2924,35 @@ Em.I18n.translations = {
   'admin.addHawqStandby.wizard.step4.task3.title': 'Start HAWQ Service',
   'admin.addHawqStandby.wizard.step4.notice.inProgress':'Please wait while HAWQ Standby Master is being deployed.',
   'admin.addHawqStandby.wizard.step4.notice.completed':'HAWQ Standby Master has been added successfully.',
+  'admin.removeHawqStandby.button.enable': 'Remove HAWQ Standby',
+  'admin.removeHawqStandby.wizard.header': 'Remove HAWQ Standby Wizard',
+  'admin.removeHawqStandby.wizard.step1.header': 'Get Started',
+  'admin.removeHawqStandby.wizard.step1.body':'This wizard walks you through the process of removing the HAWQ Standby Master ' +
+      'in the event of HAWQ Standby Master host failure or maintenance. After you remove the HAWQ Standby Master, the existing HAWQ Master will run in standalone mode without a backup.' +
+      '<br/><br/><b>This procedure stops and restarts the HAWQ service. Perform this procedure during a scheduled cluster ' +
+      'maintenance window, only when HAWQ Master is functioning properly.</b>' +
+      '<br/><br/>After you complete this wizard, the HAWQ cluster will no longer have a Standby Master. ' +
+      'As a best practice, use the “Add HAWQ Standby Master” service action to configure a new HAWQ Standby Master for the cluster.',
+  'admin.removeHawqStandby.wizard.step2.header': 'Review',
+  'admin.removeHawqStandby.wizard.step2.hawqStandby': '<b>Current HAWQ Standby:</b>',
+  'admin.removeHawqStandby.wizard.step2.confirm.config.body':'<div class="alert alert-info">' +
+      '<b>Review Configuration Changes.</b></br></br>After removing the HAWQ Standby Master, the Wizard removes the ' +
+      'hawq_standby_address_host property from hawq-site.xml. As a best practice, you should configure a new HAWQ Standby Master host after the Wizard completes.</div>',
+  'admin.removeHawqStandby.wizard.step2.confirm.host.body':'<b>Review HAWQ Standby Master role changes.</b>',
+  'admin.removeHawqStandby.wizard.step2.confirmPopup.body': 'Do you wish to continue with removing HAWQ Standby Master? Please confirm, before proceeding as you will not be able to rollback from Ambari.',
+  'admin.removeHawqStandby.wizard.step3.header': 'Finalize Setup',
+  'admin.removeHawqStandby.wizard.step3.task0.title': 'Remove HAWQ Standby',
+  'admin.removeHawqStandby.wizard.step3.task1.title': 'Stop HAWQ Service',
+  'admin.removeHawqStandby.wizard.step3.task2.title': 'Reconfigure HAWQ',
+  'admin.removeHawqStandby.wizard.step3.task3.title': 'Delete Role: HAWQ Standby',
+  'admin.removeHawqStandby.wizard.step3.task4.title': 'Start HAWQ Service',
+  'admin.removeHawqStandby.closePopup':'Remove HAWQ Standby Wizard is in progress. You must allow the wizard to' +
+      ' complete for Ambari to be in usable state. If you choose to quit, you must follow manual instructions to' +
+      ' get back to a stable state. Are you sure you want to exit the wizard?',
+  'admin.removeHawqStandby.wizard.step3.notice.inProgress':'Please wait while HAWQ Standby is being removed',
+  'admin.removeHawqStandby.wizard.step3.notice.completed':'HAWQ Standby has been removed successfully.',
+  'admin.removeHawqStandby.wizard.step3.removeHawqStandbyCommand.context': 'Execute HAWQ Standby remove command',
+  'admin.removeHawqStandby.wizard.step3.save.configuration.note': 'This configuration was created by Remove HAWQ Standby wizard',
   'admin.activateHawqStandby.button.enable': 'Activate HAWQ Standby',
   'admin.activateHawqStandby.wizard.header': 'Activate HAWQ Standby Wizard',
   'admin.activateHawqStandby.wizard.step1.header': 'Get Started',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/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 a3abd08..a325113 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -418,6 +418,15 @@ App.HostComponentActionMap = {
         isHidden: App.get('isSingleNode') || HS,
         disabled: false
       },
+      REMOVE_HAWQ_STANDBY: {
+        action: 'removeHawqStandby',
+        context: Em.I18n.t('admin.removeHawqStandby.button.enable'),
+        label: Em.I18n.t('admin.removeHawqStandby.button.enable'),
+        cssClass: 'icon-minus',
+        isHidden: App.get('isSingleNode') || !HS,
+        disabled: !HM || HM.get('workStatus') != App.HostComponentStatus.started,
+        hideFromComponentView: true
+      },
       ACTIVATE_HAWQ_STANDBY: {
         action: 'activateHawqStandby',
         label: Em.I18n.t('admin.activateHawqStandby.button.enable'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 419f845..8dd9146 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -741,6 +741,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
     addHawqStandby: require('routes/add_hawq_standby_routes'),
 
+    removeHawqStandby: require('routes/remove_hawq_standby_routes'),
+
     activateHawqStandby: require('routes/activate_hawq_standby_routes'),
 
     rollbackHighAvailability: require('routes/rollbackHA_routes')

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/routes/remove_hawq_standby_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/remove_hawq_standby_routes.js b/ambari-web/app/routes/remove_hawq_standby_routes.js
new file mode 100644
index 0000000..44d88dd
--- /dev/null
+++ b/ambari-web/app/routes/remove_hawq_standby_routes.js
@@ -0,0 +1,190 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+module.exports = App.WizardRoute.extend({
+  route: '/highAvailability/Hawq/remove',
+
+  enter: function (router, transition) {
+    var removeHawqStandbyWizardController = router.get('removeHawqStandbyWizardController');
+    removeHawqStandbyWizardController.dataLoading().done(function () {
+      App.router.set('mainServiceItemController.content', App.Service.find().findProperty('serviceName', 'HAWQ'));
+    });
+    Em.run.next(function() {
+      App.router.get('updateController').set('isWorking', false);
+      var popup = App.ModalPopup.show({
+        classNames: ['full-width-modal'],
+        header: Em.I18n.t('admin.removeHawqStandby.wizard.header'),
+        bodyClass: App.RemoveHawqStandbyWizardView.extend({
+          controller: removeHawqStandbyWizardController
+        }),
+        primary: Em.I18n.t('form.cancel'),
+        showFooter: false,
+        secondary: null,
+
+        onClose: function () {
+          var removeHawqStandbyWizardController = router.get('removeHawqStandbyWizardController'),
+              currStep = removeHawqStandbyWizardController.get('currentStep')
+          if (parseInt(currStep) === 3) {
+            App.showConfirmationPopup(function () {
+              var controller = router.get('removeHawqStandbyWizardController');
+              router.get('updateController').set('isWorking', true);
+              removeHawqStandbyWizardController.finish();
+              App.clusterStatus.setClusterStatus({
+                clusterName: App.router.getClusterName(),
+                clusterState: 'DEFAULT',
+                localdb: App.db.data
+              }, {
+                alwaysCallback: function () {
+                  controller.get('popup').hide();
+                  router.transitionTo('main.services.index');
+                  Em.run.next(function() {
+                    location.reload();
+                  });
+                }
+              });
+            }, Em.I18n.t('admin.removeHawqStandby.closePopup'));
+          } else {
+            var controller = router.get('removeHawqStandbyWizardController');
+            router.get('updateController').set('isWorking', true);
+            removeHawqStandbyWizardController.finish();
+            App.clusterStatus.setClusterStatus({
+              clusterName: App.router.getClusterName(),
+              clusterState: 'DEFAULT',
+              localdb: App.db.data
+            }, {
+              alwaysCallback: function () {
+                controller.get('popup').hide();
+                router.transitionTo('main.services.index');
+                Em.run.next(function() {
+                  location.reload();
+                });
+              }
+            });
+          }
+        },
+        didInsertElement: function () {
+          this.fitHeight();
+        }
+      });
+      removeHawqStandbyWizardController.set('popup', popup);
+      var currentClusterStatus = App.clusterStatus.get('value');
+      if (currentClusterStatus) {
+        switch (currentClusterStatus.clusterState) {
+          case 'REMOVE_HAWQ_STANDBY' :
+            removeHawqStandbyWizardController.setCurrentStep(currentClusterStatus.localdb.RemoveHawqStandbyWizard.currentStep);
+            break;
+          default:
+            var currStep = App.router.get('removeHawqStandbyWizardController.currentStep');
+            removeHawqStandbyWizardController.setCurrentStep(currStep);
+            break;
+        }
+      }
+      router.transitionTo('step' + removeHawqStandbyWizardController.get('currentStep'));
+    });
+  },
+
+  step1: Em.Route.extend({
+    route: '/step1',
+    connectOutlets: function (router) {
+      var controller = router.get('removeHawqStandbyWizardController');
+      controller.dataLoading().done(function () {
+        controller.setCurrentStep('1');
+        controller.connectOutlet('removeHawqStandbyWizardStep1', controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      var controller = router.get('removeHawqStandbyWizardController');
+      var hawqMaster = App.HostComponent.find().findProperty('componentName','HAWQMASTER').get('hostName');
+      var hawqStandby = App.HostComponent.find().findProperty('componentName','HAWQSTANDBY').get('hostName');
+      var hawqHosts = {
+        hawqMaster: hawqMaster,
+        hawqStandby: hawqStandby
+      };
+      controller.saveHawqHosts(hawqHosts);
+      router.transitionTo('step2');
+    }
+  }),
+
+  step2: Em.Route.extend({
+    route: '/step2',
+    connectOutlets: function (router) {
+      var controller = router.get('removeHawqStandbyWizardController');
+      controller.dataLoading().done(function () {
+        controller.setCurrentStep('2');
+        controller.loadAllPriorSteps();
+        controller.connectOutlet('removeHawqStandbyWizardStep2', controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      App.showConfirmationPopup(function() {
+        var wizardController = router.get('removeHawqStandbyWizardController');
+        var stepController = router.get('removeHawqStandbyWizardStep2Controller');
+        var configs = stepController.get('selectedService.configs');
+        wizardController.saveConfigs(configs);
+        router.transitionTo('step3');
+      }, Em.I18n.t('admin.removeHawqStandby.wizard.step2.confirmPopup.body'));
+    },
+    back: Em.Router.transitionTo('step1')
+  }),
+  step3: Em.Route.extend({
+    route: '/step3',
+    connectOutlets: function (router) {
+      var controller = router.get('removeHawqStandbyWizardController');
+      controller.dataLoading().done(function () {
+        controller.setCurrentStep('3');
+        controller.setLowerStepsDisable(3);
+        controller.loadAllPriorSteps();
+        controller.connectOutlet('removeHawqStandbyWizardStep3', controller.get('content'));
+      })
+    },
+    unroutePath: function (router, path) {
+      // allow user to leave route if wizard has finished
+      if (router.get('removeHawqStandbyWizardController').get('isFinished')) {
+        this._super(router, path);
+      } else {
+        return false;
+      }
+    },
+    next: function (router) {
+      var controller = router.get('removeHawqStandbyWizardController');
+      controller.finish();
+      App.clusterStatus.setClusterStatus({
+        clusterName: controller.get('content.cluster.name'),
+        clusterState: 'DEFAULT',
+        localdb: App.db.data
+      }, {
+        alwaysCallback: function () {
+          controller.get('popup').hide();
+          router.transitionTo('main.services.index');
+          Em.run.next(function () {
+            location.reload();
+          });
+        }
+      });
+    }
+  })
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step1.hbs b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step1.hbs
new file mode 100644
index 0000000..02ceb03
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step1.hbs
@@ -0,0 +1,28 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.removeHawqStandby.wizard.step1.header}}</h2>
+
+  <div class="alert alert-info">
+    {{t admin.removeHawqStandby.wizard.step1.body}}
+  </div>
+
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step2.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step2.hbs b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step2.hbs
new file mode 100644
index 0000000..b795887
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step2.hbs
@@ -0,0 +1,43 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<h2>{{t admin.removeHawqStandby.wizard.step2.header}}</h2>
+
+<div class="alert alert-info">
+  {{t admin.removeHawqStandby.wizard.step2.confirm.host.body}}
+</div>
+
+<div id="remove-standby-step2-content" class="well pre-scrollable">
+    <div id="remove-standby-step2-info">
+        <table id="ha-step3-review-table">
+            <tr>
+                <td>{{t admin.removeHawqStandby.wizard.step2.hawqStandby}}</td>
+                <td>{{controller.content.hawqHosts.hawqStandby}}</td>
+		        <td><span class="to-be-disabled-red"><i class="icon-minus"></i>&nbsp;{{t admin.highAvailability.wizard.step3.toBeDeleted}}</span></td>
+            </tr>
+        </table>
+    </div>
+</div>
+
+<div id="serviceConfig">
+  {{{t admin.removeHawqStandby.wizard.step2.confirm.config.body}}}
+</div>
+
+<div class="btn-area">
+    <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
+    <a class="btn btn-success pull-right" {{action submit target="controller"}} {{bindAttr disabled="controller.isSubmitDisabled"}}>{{t common.next}} &rarr;</a>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step3.hbs b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step3.hbs
new file mode 100644
index 0000000..6b4923a
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/step3.hbs
@@ -0,0 +1,18 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+{{{template "templates/common/progress"}}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/wizard.hbs b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/wizard.hbs
new file mode 100644
index 0000000..18c589a
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/hawq/removeStandby/wizard.hbs
@@ -0,0 +1,44 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<div id="hawq-ha-wizard" class="wizard">
+  <div class="container">
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span3">
+          <!--Sidebar content-->
+          <div class="well">
+            <ul class="nav nav-pills nav-stacked">
+              <li class="nav-header">{{t admin.removeHawqStandby.wizard.header}}</li>
+              <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t admin.removeHawqStandby.wizard.step1.header}}</a></li>
+              <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep2 target="controller"}}>{{t admin.removeHawqStandby.wizard.step2.header}}</a></li>
+              <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep3 target="controller"}}>{{t admin.removeHawqStandby.wizard.step3.header}}</a></li>
+            </ul>
+          </div>
+        </div>
+          <div class="wizard-content well span9">
+            {{#if view.isLoaded}}
+              {{outlet}}
+            {{else}}
+                {{view App.SpinnerView}}
+            {{/if}}
+          </div>
+      </div>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index 61acdee..865839c 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -44,6 +44,7 @@ var InitialData = {
   'HighAvailabilityWizard': {},
   'RMHighAvailabilityWizard': {},
   'AddHawqStandbyWizard': {},
+  'RemoveHawqStandbyWizard': {},
   'ActivateHawqStandbyWizard': {},
   'RAHighAvailabilityWizard': {},
   'RollbackHighAvailabilityWizard': {},

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 9761d11..aa85bae 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -170,6 +170,10 @@ require('views/main/admin/highAvailability/hawq/addStandby/step1_view');
 require('views/main/admin/highAvailability/hawq/addStandby/step2_view');
 require('views/main/admin/highAvailability/hawq/addStandby/step3_view');
 require('views/main/admin/highAvailability/hawq/addStandby/step4_view');
+require('views/main/admin/highAvailability/hawq/removeStandby/wizard_view');
+require('views/main/admin/highAvailability/hawq/removeStandby/step1_view');
+require('views/main/admin/highAvailability/hawq/removeStandby/step2_view');
+require('views/main/admin/highAvailability/hawq/removeStandby/step3_view');
 require('views/main/admin/highAvailability/hawq/activateStandby/wizard_view');
 require('views/main/admin/highAvailability/hawq/activateStandby/step1_view');
 require('views/main/admin/highAvailability/hawq/activateStandby/step2_view');

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step1_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step1_view.js
new file mode 100644
index 0000000..dc9af5a
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step1_view.js
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardStep1View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/hawq/removeStandby/step1')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step2_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step2_view.js
new file mode 100644
index 0000000..b9ab638
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step2_view.js
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardStep2View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/hawq/removeStandby/step2')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js
new file mode 100644
index 0000000..8c21beb
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/step3_view.js
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardStep3View = App.HighAvailabilityProgressPageView.extend({
+
+  templateName: require('templates/main/admin/highAvailability/hawq/removeStandby/step3'),
+
+  headerTitle: Em.I18n.t('admin.removeHawqStandby.wizard.step3.header'),
+
+  noticeInProgress: Em.I18n.t('admin.removeHawqStandby.wizard.step3.notice.inProgress'),
+
+  noticeCompleted: Em.I18n.t('admin.removeHawqStandby.wizard.step3.notice.completed'),
+
+  submitButtonText: Em.I18n.t('common.complete'),
+
+  labelWidth: 'span5'
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/wizard_view.js b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/wizard_view.js
new file mode 100644
index 0000000..0ccb120
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/hawq/removeStandby/wizard_view.js
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RemoveHawqStandbyWizardView = Em.View.extend(App.WizardMenuMixin, {
+
+  didInsertElement: function() {
+    var currentStep = this.get('controller.currentStep');
+    if (currentStep > 3) {
+      this.get('controller').setLowerStepsDisable(currentStep);
+    }
+  },
+
+  templateName: require('templates/main/admin/highAvailability/hawq/removeStandby/wizard'),
+
+  isLoaded: false,
+
+  willInsertElement: function() {
+    this.set('isLoaded', false);
+    this.loadHosts();
+  },
+
+  /**
+   * load hosts from server
+   */
+  loadHosts: function () {
+    App.ajax.send({
+      name: 'hosts.high_availability.wizard',
+      data: {},
+      sender: this,
+      success: 'loadHostsSuccessCallback',
+      error: 'loadHostsErrorCallback'
+    });
+  },
+
+  loadHostsSuccessCallback: function (data, opt, params) {
+    var hosts = {};
+
+    data.items.forEach(function (item) {
+      hosts[item.Hosts.host_name] = {
+        name: item.Hosts.host_name,
+        cpu: item.Hosts.cpu_count,
+        memory: item.Hosts.total_mem,
+        disk_info: item.Hosts.disk_info,
+        bootStatus: "REGISTERED",
+        isInstalled: true
+      };
+    });
+    App.db.setHosts(hosts);
+    this.set('controller.content.hosts', hosts);
+    this.set('isLoaded', true);
+  },
+
+  loadHostsErrorCallback: function(){
+    this.set('isLoaded', true);
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/host/details/host_component_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js
index d059498..a66a1a9 100644
--- a/ambari-web/app/views/main/host/details/host_component_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_view.js
@@ -312,15 +312,17 @@ App.HostComponentView = Em.View.extend({
       }
 
       var commandMap = App.HostComponentActionMap.getMap(self)[command];
-      customCommands.push({
-        label: self.getCustomCommandLabel(command),
-        service: component.get('serviceName'),
-        hosts: hostComponent.get('hostName'),
-        context: (!!commandMap && !!commandMap.context) ? commandMap.context : null,
-        component: component.get('componentName'),
-        command: command,
-        disabled: !!commandMap ? !!commandMap.disabled : false
-      });
+      if (!commandMap.hideFromComponentView) {
+        customCommands.push({
+          label: self.getCustomCommandLabel(command),
+          service: component.get('serviceName'),
+          hosts: hostComponent.get('hostName'),
+          context: (!!commandMap && !!commandMap.context) ? commandMap.context : null,
+          component: component.get('componentName'),
+          command: command,
+          disabled: !!commandMap ? !!commandMap.disabled : false
+        });
+      }
     });
 
     return customCommands;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 020048b..0e3c52b 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -35,7 +35,7 @@ App.MainServiceItemView = Em.View.extend({
     'RESOURCEMANAGER': ['DECOMMISSION', 'REFRESHQUEUES'],
     'HBASE_MASTER': ['DECOMMISSION'],
     'KNOX_GATEWAY': ['STARTDEMOLDAP','STOPDEMOLDAP'],
-    'HAWQMASTER': ['IMMEDIATE_STOP_HAWQ_SERVICE', 'RUN_HAWQ_CHECK', 'HAWQ_CLEAR_CACHE'],
+    'HAWQMASTER': ['IMMEDIATE_STOP_HAWQ_SERVICE', 'RUN_HAWQ_CHECK', 'HAWQ_CLEAR_CACHE', 'REMOVE_HAWQ_STANDBY'],
     'HAWQSEGMENT': ['IMMEDIATE_STOP_HAWQ_SEGMENT'],
     'HAWQSTANDBY' : ['RESYNC_HAWQ_STANDBY','ACTIVATE_HAWQ_STANDBY']
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6ecddf6/ambari-web/test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test.js
new file mode 100644
index 0000000..0a55445
--- /dev/null
+++ b/ambari-web/test/controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller_test.js
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+require('controllers/main/admin/highAvailability/hawq/removeStandby/step2_controller');
+
+describe('App.RemoveHawqStandbyWizardStep2Controller', function () {
+
+  describe('#isSubmitDisabled', function () {
+
+    var controller = App.RemoveHawqStandbyWizardStep2Controller.create({
+        content: Em.Object.create({})
+      }),
+      cases = [
+        {
+          isLoaded: false,
+          isSubmitDisabled: true,
+          title: 'wizard step content not loaded'
+        },
+        {
+          isLoaded: true,
+          isSubmitDisabled: false,
+          title: 'wizard step content loaded'
+        }
+      ];
+
+    cases.forEach(function (item) {
+      it(item.title, function () {
+        controller.set('isLoaded', item.isLoaded);
+        expect(controller.get('isSubmitDisabled')).to.equal(item.isSubmitDisabled);
+      });
+    });
+
+  });
+
+
+});


Mime
View raw message