Repository: ambari Updated Branches: refs/heads/branch-2.5 c12fbcc2d -> e875aa3ae
AMBARI-19716. CS queue refresh happens before the user clicks on the restart button. (Vivek Subramanian via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e875aa3a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e875aa3a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e875aa3a Branch: refs/heads/branch-2.5 Commit: e875aa3ae0337cc6869f0c58f9b15c3dadd07fa5 Parents: c12fbcc Author: Yusaku Sako <[email protected]> Authored: Mon Jan 30 10:05:44 2017 -0800 Committer: Yusaku Sako <[email protected]> Committed: Mon Jan 30 10:07:09 2017 -0800 ---------------------------------------------------------------------- ambari-web/app/messages.js | 4 +++- .../configs/component_actions_by_configs.js | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e875aa3a/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index bf3de62..9a41a63 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -417,8 +417,10 @@ Em.I18n.translations = { 'popup.highlight':'click to highlight', 'popup.confirmation.commonHeader':'Confirmation', 'popup.confirmation.refreshYarnQueues.body':'It is strongly recommended to <strong>Refresh Yarn Queues</strong> after making a change to the capacity scheduler configuration. Would you like to proceed?', - 'popup.warning.refreshYarnQueues.body': '<div class="alert alert-warning"><strong>Warning: </strong>The queue configuration change may have affected the queue used by LLAP. An LLAP reconfiguration or restart may be required.</div>', + 'popup.warning.refreshYarnQueues.body': '<div class="alert alert-warning"><strong>Warning: </strong>The queue configuration change may have affected the queue used by Hive LLAP. A Hive LLAP reconfiguration or restart may be required.</div>', 'popup.confirmation.refreshYarnQueues.buttonText':'Refresh Yarn Queues', + 'popup.confirmation.hsiRestart.body':'It is strongly recommended to <strong>Restart HiveServer2 Interactive</strong> after making a change to the Hive LLAP sizing configuration. Would you like to proceed?', + 'popup.confirmation.hsiRestart.buttonText':'Restart HiveServer2 Interactive', 'popup.prompt.commonHeader':'Prompt', 'popup.confirmationFeedBack.sending':'Sending...', 'popup.confirmationFeedBack.query.fail':'Request failed', http://git-wip-us.apache.org/repos/asf/ambari/blob/e875aa3a/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js b/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js index ebfc2c7..42e2dac 100644 --- a/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js +++ b/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js @@ -17,6 +17,7 @@ */ var App = require('app'); +var batchUtils = require('utils/batch_scheduled_requests'); var stringUtils = require('utils/string_utils'); /** @@ -61,15 +62,19 @@ App.ComponentActionsByConfigs = Em.Mixin.create({ if (configs.length) { if(config_action.get('fileName') === 'capacity-scheduler.xml' && !self.isYarnQueueRefreshed) { + var hsiInstance = App.HostComponent.find().filterProperty('componentName', "HIVE_SERVER_INTERACTIVE"); if(self.get('content.serviceName') === 'HIVE') { // Auto refresh yarn capacity scheduler if capacity-scheduler configs are changed from Hive configs page self.popupPrimaryButtonCallback(config_action); + // Show a popup to restart HSI if HSI is enabled + if(hsiInstance.length > 0) { + self.showHsiRestartPopup(hsiInstance); + } } else { self.configAction = config_action; var body = config_action.get('popupProperties').body; if(config_action.get('popupProperties').hasOwnProperty('conditionalWarning') && config_action.get('popupProperties').conditionalWarning === true) { // Check if Hive Server 2 Interactive is enabled and show a warning message if it is enabled - var hsiInstance = App.HostComponent.find().filterProperty('componentName', "HIVE_SERVER_INTERACTIVE"); if(hsiInstance.length > 0) { body += "<br/><br/>" + config_action.get('popupProperties').warningMessage; } @@ -84,6 +89,17 @@ App.ComponentActionsByConfigs = Em.Mixin.create({ } }, + showHsiRestartPopup: function (components) { + var self = this; + App.showConfirmationPopup(function () { + self.hsiRestartPopupPrimaryButtonCallback(components); + }, Em.I18n.t('popup.confirmation.hsiRestart.body'), null, Em.I18n.t('popup.confirmation.commonHeader'), Em.I18n.t('popup.confirmation.hsiRestart.buttonText'), false, 'restart_hsi') + }, + + hsiRestartPopupPrimaryButtonCallback: function (components) { + batchUtils.restartHostComponents(components, Em.I18n.t('rollingrestart.context.selectedComponentOnSelectedHost').format(components[0].get('displayName')), "HOST_COMPONENT"); + }, + popupPrimaryButtonCallback: function (config_action) { var hosts = App.Service.find(config_action.get('serviceName')).get('hostComponents').filterProperty('componentName', config_action.get('componentName')).mapProperty('hostName'); var self = this;
