Repository: ambari Updated Branches: refs/heads/trunk e4d0fa156 -> 0cc0e5d43
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/0cc0e5d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0cc0e5d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0cc0e5d4 Branch: refs/heads/trunk Commit: 0cc0e5d43a49d75c300bdc190954e6639e6a50e1 Parents: e4d0fa1 Author: Yusaku Sako <[email protected]> Authored: Mon Jan 30 10:05:44 2017 -0800 Committer: Yusaku Sako <[email protected]> Committed: Mon Jan 30 10:05:44 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/0cc0e5d4/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 83a19b0..8fbe198 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -431,8 +431,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/0cc0e5d4/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 35ddc0f..f52d1af 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;
