You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2017/09/18 18:34:17 UTC
ambari git commit: AMBARI-21953. Move Masters and Host Recovery
fixes. (Ishan via Jaimin)
Repository: ambari
Updated Branches:
refs/heads/branch-2.6 05b431579 -> d92e86755
AMBARI-21953. Move Masters and Host Recovery fixes. (Ishan via Jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d92e8675
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d92e8675
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d92e8675
Branch: refs/heads/branch-2.6
Commit: d92e86755b2fa3b2d062cdc100527a5bbb7fb885
Parents: 05b4315
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Sep 18 11:33:24 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Sep 18 11:34:14 2017 -0700
----------------------------------------------------------------------
.../controllers/main/service/reassign_controller.js | 6 +++---
ambari-web/app/messages.js | 6 +++---
ambari-web/app/styles/application.less | 13 +++++++++++++
.../app/views/main/service/reassign/step1_view.js | 10 ++++++++--
.../main/service/reassign/step4_controller_test.js | 4 ++--
5 files changed, 29 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d92e8675/ambari-web/app/controllers/main/service/reassign_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js b/ambari-web/app/controllers/main/service/reassign_controller.js
index 1e11eaf..1a1c5b8 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -168,9 +168,9 @@ App.ReassignMasterController = App.WizardController.extend({
* Used to define list of services to stop/start.
*/
relatedServicesMap: {
- 'RESOURCEMANAGER': ['YARN', 'MAPREDUCE2', 'TEZ', 'PIG', 'OOZIE', 'SLIDER', 'SPARK'],
- 'APP_TIMELINE_SERVER': ['YARN', 'MAPREDUCE2', 'TEZ', 'OOZIE', 'SLIDER', 'SPARK'],
- 'HISTORYSERVER': ['MAPREDUCE2', 'PIG', 'OOZIE'],
+ 'RESOURCEMANAGER': ['YARN', 'MAPREDUCE2', 'TEZ', 'HIVE', 'PIG', 'OOZIE', 'SLIDER', 'SPARK'],
+ 'APP_TIMELINE_SERVER': ['YARN', 'MAPREDUCE2', 'TEZ', 'HIVE', 'OOZIE', 'SLIDER', 'SPARK'],
+ 'HISTORYSERVER': ['MAPREDUCE2', 'HIVE', 'PIG', 'OOZIE'],
'HIVE_SERVER': ['HIVE', 'FALCON', 'ATLAS', 'OOZIE'],
'HIVE_METASTORE': ['HIVE', 'PIG', 'FALCON', 'ATLAS', 'OOZIE'],
'WEBHCAT_SERVER': ['HIVE'],
http://git-wip-us.apache.org/repos/asf/ambari/blob/d92e8675/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 3315b8a..632c9fb 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2292,7 +2292,7 @@ Em.I18n.translations = {
'services.reassign.step1.message1': 'This wizard will walk you through moving {0}.<br/>',
'services.reassign.step1.message2': 'The process to reassign {0} involves a combination of <b>automated steps</b> (that will be handled by the wizard) and ' +
'<b>manual steps</b> (that you must perform in sequence as instructed by the wizard).<br/><br/>',
- 'services.reassign.step1.message3': '<br/><p class="alert">Following services will be restarted as part of the wizard: <b>{0}</b>. You should plan a cluster maintenance window and prepare ' +
+ 'services.reassign.step1.message3': '<br/><p class="restart-services-alert">Following services will be restarted as part of the wizard: <b>{0}</b>. You should plan a cluster maintenance window and prepare ' +
'for cluster downtime when moving {1}.</p>',
'services.reassign.step2.header':'Assign Master',
@@ -2752,9 +2752,9 @@ Em.I18n.translations = {
'hosts.delete.popup.title':'Delete Host',
'hosts.delete.popup.unknownComponents':'The following components have unknown status:',
'hosts.recover.popup.title': 'Confirmation',
- 'hosts.recover.popup.body': 'This action will completely re-install all components on this host, and should only be used when restoring a host using replacement hardware. <strong>Are you sure you want to continue?<strong>',
+ 'hosts.recover.popup.body': 'This action will completely re-install all components on this host. <strong>Are you sure you want to continue?<strong>',
'hosts.recover.error.popup.title': 'Cannot Recover Host',
- 'hosts.recover.error.popup.body': 'Host cannot be recovered unless every host component is not in Stopped, Install Failed or Init state',
+ 'hosts.recover.error.popup.body': 'This host cannot be recovered unless every component is Stopped. Please stop all components and try again.',
'hosts.cant.do.popup.title':'Unable to Delete Host',
'hosts.cant.do.popup.masterList.body':'This host cannot be deleted since it has the following master components:',
'hosts.cant.do.popup.masterList.body.end':'To delete this host, you must first move all the master components listed above.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/d92e8675/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 12adf88..b06af9d 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6505,3 +6505,16 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
}
}
}
+
+
+.restart-services-alert {
+ padding: 8px 35px 8px 14px;
+ margin-bottom: 20px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ color: #b94a48;
+ background-color: #f2dede;
+ border: 1px solid #b94a48;
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d92e8675/ambari-web/app/views/main/service/reassign/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/reassign/step1_view.js b/ambari-web/app/views/main/service/reassign/step1_view.js
index b7787c0..5e677e2 100644
--- a/ambari-web/app/views/main/service/reassign/step1_view.js
+++ b/ambari-web/app/views/main/service/reassign/step1_view.js
@@ -25,15 +25,21 @@ App.ReassignMasterWizardStep1View = Em.View.extend({
message: function () {
var componentName = this.get('controller.content.reassign.component_name');
var listOfServices;
+ var installedServices = App.Service.find().mapProperty('serviceName');
if(this.get('controller.content.componentsToStopAllServices').contains(componentName)) {
- listOfServices = App.Service.find().mapProperty('serviceName');
+ listOfServices = installedServices;
} else {
listOfServices = this.get('controller.target.reassignMasterController.relatedServicesMap')[componentName];
if(!listOfServices || !listOfServices.length) {
- listOfServices = App.Service.find().mapProperty('serviceName').filter(function (service) {
+ listOfServices = installedServices.filter(function (service) {
return service != 'HDFS';
});
+ } else { //not display any service which is not installed
+ var installedServicesToStop = listOfServices.filter(function (service) {
+ return installedServices.contains(service);
+ });
+ listOfServices = installedServicesToStop;
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/d92e8675/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 5193b7a..8eb9c9f 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -263,7 +263,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
controller.set('content.reassign.component_name', 'HISTORYSERVER');
controller.set('content.componentsToStopAllServices', ['NAMENODE', 'SECONDARY_NAMENODE'])
controller.stopRequiredServices();
- expect(controller.stopServices.calledWith(['MAPREDUCE2', 'PIG', 'OOZIE'], true)).to.be.true;
+ expect(controller.stopServices.calledWith(['MAPREDUCE2', 'HIVE', 'PIG', 'OOZIE'], true)).to.be.true;
});
});
@@ -937,7 +937,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
it("component has related services", function() {
controller.set('content.reassign.component_name', 'HISTORYSERVER');
controller.startRequiredServices();
- expect(controller.startServices.calledWith(false, ['MAPREDUCE2', 'PIG', 'OOZIE'], true)).to.be.true;
+ expect(controller.startServices.calledWith(false, ['MAPREDUCE2', 'HIVE', 'PIG', 'OOZIE'], true)).to.be.true;
});
it("component does not have related services", function() {
controller.set('content.reassign.component_name', 'C1');