You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jg...@apache.org on 2018/04/27 15:15:16 UTC
[ambari] branch branch-feature-AMBARI-14714 updated: [AMBARI-23611]
Add service groups to start/stop/restart functions (#1109)
This is an automated email from the ASF dual-hosted git repository.
jgolieb pushed a commit to branch branch-feature-AMBARI-14714
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by this push:
new 0b704ad [AMBARI-23611] Add service groups to start/stop/restart functions (#1109)
0b704ad is described below
commit 0b704ade5b372d61714cd7b3008b46dfea3f9eec
Author: Jason Golieb <j...@golieb.net>
AuthorDate: Fri Apr 27 11:15:10 2018 -0400
[AMBARI-23611] Add service groups to start/stop/restart functions (#1109)
* Fixed several start/stop/restart commands from the front end.
* Fixed additional unit tests.
---
.../app/controllers/global/update_controller.js | 2 +-
.../nameNode/rollbackHA/step2_controller.js | 2 +-
.../nameNode/rollback_controller.js | 10 +--
.../highAvailability/nameNode/step4_controller.js | 2 +-
.../highAvailability/nameNode/step5_controller.js | 2 +-
.../highAvailability/nameNode/step6_controller.js | 2 +-
.../highAvailability/nameNode/step9_controller.js | 2 +-
.../main/admin/kerberos/step6_controller.js | 4 +-
.../controllers/main/admin/service_auto_start.js | 12 ++--
.../main/host/bulk_operations_controller.js | 3 +-
ambari-web/app/controllers/main/host/details.js | 14 ++--
ambari-web/app/controllers/main/service.js | 6 +-
.../app/controllers/main/service/info/summary.js | 2 +-
ambari-web/app/controllers/main/service/item.js | 52 ++++++++++-----
.../main/service/reassign/step4_controller.js | 58 ++++++++--------
.../main/service/reassign/step6_controller.js | 6 +-
.../main/service/reassign/step7_controller.js | 4 +-
.../app/controllers/wizard/step9_controller.js | 4 +-
ambari-web/app/mappers/hosts_mapper.js | 2 +
ambari-web/app/mappers/service_mapper.js | 2 +
ambari-web/app/mappers/service_metrics_mapper.js | 2 +-
ambari-web/app/mappers/stack_mapper.js | 1 +
.../details/host_components/decommissionable.js | 2 +-
.../details/host_components/install_component.js | 2 +-
.../details/support_client_configs_download.js | 2 +-
.../configs/component_actions_by_configs.js | 2 +-
.../mixins/wizard/wizardProgressPageController.js | 14 ++--
ambari-web/app/models/host_component.js | 4 +-
ambari-web/app/models/service.js | 1 +
ambari-web/app/styles/dashrow.less | 8 +--
ambari-web/app/utils/ajax/ajax.js | 30 ++++++++-
ambari-web/app/utils/batch_scheduled_requests.js | 77 ++++++++++++++--------
.../details/host_component_views/datanode_view.js | 2 +-
.../info/metrics/flume/flume_metric_graph.js | 2 +-
.../info/metrics/flume/flume_metric_graphs.js | 2 +-
.../nameNode/step4_controller_test.js | 2 +-
.../nameNode/step5_controller_test.js | 2 +-
.../nameNode/step6_controller_test.js | 2 +-
.../nameNode/step9_controller_test.js | 2 +-
.../main/admin/kerberos/step6_controller_test.js | 6 +-
.../main/admin/service_auto_start_test.js | 12 +---
.../test/controllers/main/host/details_test.js | 16 ++---
.../main/service/reassign/step4_controller_test.js | 14 ++--
.../main/service/reassign/step6_controller_test.js | 6 +-
.../main/service/reassign/step7_controller_test.js | 8 +--
ambari-web/test/controllers/main/service_test.js | 16 ++---
.../host_components/install_component_test.js | 2 +-
.../configs/component_actions_by_configs_test.js | 2 +-
.../host_component_views/datanode_view_test.js | 2 +-
.../host_component_views/decommissionable_test.js | 2 +-
50 files changed, 257 insertions(+), 179 deletions(-)
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 8bf96ed..cc97a58 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -547,7 +547,7 @@ App.UpdateController = Em.Controller.extend({
updateServices: function (callback) {
var testUrl = '/data/services/HDP2/services.json';
- var componentConfigUrl = this.getUrl(testUrl, '/services?fields=ServiceInfo/state,ServiceInfo/maintenance_state,components/ServiceComponentInfo/component_name&minimal_response=true');
+ var componentConfigUrl = this.getUrl(testUrl, '/services?fields=ServiceInfo/state,ServiceInfo/maintenance_state,components');
App.HttpClient.get(componentConfigUrl, App.serviceMapper, {
complete: callback
});
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js
index 60d2876..07da111 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js
@@ -28,7 +28,7 @@ App.RollbackHighAvailabilityWizardStep2Controller = App.HighAvailabilityWizardSt
sender: this,
data: {
hostName: hostName,
- nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('compId')
+ nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('componentId')
},
success: 'checkNnCheckPointStatus'
});
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
index c9d3b00..2895f88 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
@@ -220,7 +220,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
stopAllServices: function(){
App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
data: {
context: "Stop all services",
"ServiceInfo": {
@@ -345,7 +345,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
},
startAllServices: function(){
App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
data: {
context: "Start all services",
"ServiceInfo": {
@@ -480,7 +480,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
sender: this,
data: {
hostName: hostName[i],
- componentId: App.HostComponent.find().findProperty('componentName', componentName).get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', componentName).get('componentId'),
passive_state: "ON",
taskNum: hostName.length,
callback: 'checkBeforeDelete'
@@ -501,7 +501,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
name: 'admin.high_availability.getHostComponent',
sender: this,
data: {
- componentId: App.HostComponent.find().findProperty('componentName', componentName).get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', componentName).get('componentId'),
hostName: hostName[i],
taskNum: hostName.length,
callback: 'deleteComponent'
@@ -550,7 +550,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
name: 'common.delete.host_component',
sender: this,
data: {
- componentId: App.HostComponent.find().findProperty('componentName', componentName).get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', componentName).get('componentId'),
hostName: hostName[i]
},
success: 'onDeleteComplete',
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js
index e444548..49272a4 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js
@@ -39,7 +39,7 @@ App.HighAvailabilityWizardStep4Controller = Em.Controller.extend({
sender: this,
data: {
hostName: hostName,
- nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('compId')
+ nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('componentId')
},
success: 'checkNnCheckPointStatus'
});
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js
index 1dcc44e..becea71 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js
@@ -54,7 +54,7 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont
data: {
hostName: hostName,
passive_state: "ON",
- componentId: App.HostComponent.find().findProperty('componentName', 'SECONDARY_NAMENODE').get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', 'SECONDARY_NAMENODE').get('componentId'),
},
success: 'onTaskCompleted',
error: 'onTaskError'
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js
index 1122f44..4bff587 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js
@@ -81,7 +81,7 @@ App.HighAvailabilityWizardStep6Controller = Em.Controller.extend({
sender: this,
data: {
hostName: hostName,
- jnId: App.HostComponent.find().findProperty('componentName', 'JOURNALNODE').get('compId')
+ jnId: App.HostComponent.find().findProperty('componentName', 'JOURNALNODE').get('componentId')
},
success: 'checkJnCheckPointStatus'
});
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
index f56f166..7c490a9 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
@@ -310,7 +310,7 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
name: 'common.delete.host_component',
sender: this,
data: {
- componentId: App.HostComponent.find().findProperty('componentName', 'SECONDARY_NAMENODE').get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', 'SECONDARY_NAMENODE').get('componentId'),
hostName: hostName
},
success: 'onTaskCompleted',
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step6_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step6_controller.js
index 1e81c3e..ce03647 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step6_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step6_controller.js
@@ -23,7 +23,7 @@ App.KerberosWizardStep6Controller = App.KerberosProgressPageController.extend({
stopServices: function () {
App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
data: {
context: "Stop services",
"ServiceInfo": {
@@ -60,7 +60,7 @@ App.KerberosWizardStep6Controller = App.KerberosProgressPageController.extend({
name: 'common.delete.host_component',
sender: this,
data: {
- componentId: App.HostComponent.find().findProperty('componentName', 'APP_TIMELINE_SERVER').get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', 'APP_TIMELINE_SERVER').get('componentId'),
hostName: App.HostComponent.find().findProperty('componentName', 'APP_TIMELINE_SERVER').get('hostName')
},
success: 'onDeleteATSSuccess',
diff --git a/ambari-web/app/controllers/main/admin/service_auto_start.js b/ambari-web/app/controllers/main/admin/service_auto_start.js
index 79dec3b..1c9b319 100644
--- a/ambari-web/app/controllers/main/admin/service_auto_start.js
+++ b/ambari-web/app/controllers/main/admin/service_auto_start.js
@@ -112,12 +112,14 @@ App.MainAdminServiceAutoStartController = Em.Controller.extend({
},
load: function() {
+ const self = this;
+
this.loadClusterSettings().done(function (settings) {
- this.set('clusterConfigs', settings);
- this.set('isGeneralRecoveryEnabled', settings.recovery_enabled === 'true');
- this.set('isGeneralRecoveryEnabledCached', this.get('isGeneralRecoveryEnabled'));
- this.loadComponentsConfigs().then(() => {
- this.set('isLoaded', true);
+ self.set('clusterConfigs', settings);
+ self.set('isGeneralRecoveryEnabled', settings.recovery_enabled === 'true');
+ self.set('isGeneralRecoveryEnabledCached', self.get('isGeneralRecoveryEnabled'));
+ self.loadComponentsConfigs().then(() => {
+ self.set('isLoaded', true);
});
});
},
diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
index 90a089b..7235a00 100644
--- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js
+++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js
@@ -192,7 +192,7 @@ App.BulkOperationsController = Em.Controller.extend({
return batchUtils.getComponentsFromServer({
passiveState: 'OFF',
hosts: hosts.mapProperty('hostName'),
- displayParams: ['host_components/HostRoles/component_name']
+ displayParams: ['host_components/HostRoles/component_name', 'host_components/HostRoles/service_group_name']
}, this._getComponentsFromServerForRestartCallback);
},
@@ -208,6 +208,7 @@ App.BulkOperationsController = Em.Controller.extend({
host.host_components.forEach(function (hostComponent) {
hostComponents.push(O.create({
componentName: hostComponent.HostRoles.component_name,
+ serviceGroupName: hostComponent.HostRoles.service_group_name,
hostName: host.Hosts.host_name
}));
})
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 2c3fc88..81b0e73 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -328,9 +328,9 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
}
};
if (Array.isArray(component)) {
- data.query = "HostRoles/component_name.in(" + component.mapProperty('componentName').join(',') + ")";
+ data.query = "HostRoles/id.in(" + component.mapProperty('componentId').join(',') + ")";
} else {
- data.componentName = component.get('componentName');
+ data.componentId = component.get('componentId');
data.serviceName = component.get('service.serviceName');
}
App.ajax.send({
@@ -422,7 +422,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
sender: this,
data: {
host: hostName || this.get('content.hostName'),
- nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('compId')
+ nameNodeId: App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('componentId')
},
success: 'parseNnCheckPointTime'
});
@@ -608,7 +608,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
name: (Em.isNone(componentName)) ? 'common.delete.host' : 'common.delete.host_component',
sender: this,
data: {
- componentId: hostComponent ? hostComponent.get('compId') : '',
+ componentId: hostComponent ? hostComponent.get('componentId') : '',
hostName: this.get('content.hostName')
},
success: '_doDeleteHostComponentSuccessCallback',
@@ -1613,6 +1613,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
var resource_filters = [
{
service_name: component.get('service.serviceName'),
+ service_group_name: component.get('service.serviceGroupName'),
component_name: component.get('componentName'),
hosts: component.get('host.hostName')
}
@@ -1765,7 +1766,6 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
installComponent: function (event) {
var self = this;
var component = event.context;
- var componentId = component.get('compId');
var displayName = component.get('displayName');
return App.ModalPopup.show({
@@ -1787,7 +1787,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
data: {
hostName: self.get('content.hostName'),
serviceName: component.get('service.serviceName'),
- componentId: componentId,
+ componentId: component.get('componentId'),
component: component,
context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName,
HostRoles: {
@@ -2312,7 +2312,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
sender: this,
data: {
hostName: this.get('content.hostName'),
- componentId: component.get('compId'),
+ componentId: component.get('componentId'),
component: component,
passive_state: state,
context: message
diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js
index 900e4f2..7455eac 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -161,7 +161,7 @@ App.MainServiceController = Em.ArrayController.extend(App.SupportClientConfigsDo
var context = (state == 'INSTALLED') ? App.BackgroundOperationsController.CommandContexts.STOP_ALL_SERVICES :
App.BackgroundOperationsController.CommandContexts.START_ALL_SERVICES;
return App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
sender: this,
data: {
context: context,
@@ -200,7 +200,7 @@ App.MainServiceController = Em.ArrayController.extend(App.SupportClientConfigsDo
*/
silentStopAllServices: function () {
return App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
sender: this,
data: {
context: App.BackgroundOperationsController.CommandContexts.STOP_ALL_SERVICES,
@@ -251,7 +251,7 @@ App.MainServiceController = Em.ArrayController.extend(App.SupportClientConfigsDo
) {
this.set('shouldStart', false);
return App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update.all',
sender: this,
data: {
context: App.BackgroundOperationsController.CommandContexts.START_ALL_SERVICES,
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 710688a..46b373e 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -325,7 +325,7 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({
context: context,
agentName: agent.get('name'),
host: agent.get('hostName'),
- componentId: App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('componentId')
},
success: 'commandSuccessCallback'
});
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 38e8ee9..4e67204 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -179,18 +179,27 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
* @type {String[]}
*/
sitesToLoad: function() {
- var services = this.get('configDependentServiceNames'), configTypeList = [];
+ const services = this.get('configDependentServiceNames');
+ let configTypeList = [];
+
if (services.length) {
- configTypeList = App.StackService.find().filter(function(s) {
- return services.contains(s.get('serviceName'));
- }).mapProperty('configTypeList').reduce(function(p, v) {
- return p.concat(v);
+ const filteredServices = App.StackService.find().filter(function (s) {
+ return services.mapProperty('name').contains(s.get('serviceName'));
});
+
+ const mappedServices = filteredServices.mapProperty('configTypeList');
+
+ if (mappedServices && mappedServices.length > 0) {
+ configTypeList = mappedServices.reduce(function (p, v) {
+ return p.concat(v);
+ });
+ }
}
+
if (this.get('serviceConfigsMap')[this.get('content.serviceName')]) {
configTypeList = configTypeList.concat(this.get('serviceConfigsMap')[this.get('content.serviceName')]);
}
- configTypeList.push('cluster-env');
+
return configTypeList.uniq();
}.property('content.serviceName'),
@@ -235,12 +244,14 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
});
self.get('configDependentServiceNames').forEach(function(serviceName) {
- var configTypes = App.StackService.find(serviceName).get('configTypeList');
- var configsByService = allConfigs.filter(function (c) {
- return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename')));
- });
- if (App.config.get('preDefinedServiceConfigs').someProperty('serviceName', serviceName)) {
- self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService));
+ var configTypes = App.StackService.find(serviceName.name).get('configTypeList');
+ if (configTypes) {
+ var configsByService = allConfigs.filter(function (c) {
+ return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename')));
+ });
+ if (configsByService && App.config.get('preDefinedServiceConfigs').someProperty('serviceName', serviceName)) {
+ self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService));
+ }
}
});
@@ -576,8 +587,10 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
},
startStopPopupPrimary: function (serviceHealth, query, components, hosts, label) {
- const isStart = (serviceHealth === 'STARTED'),
- serviceName = this.get('content.serviceName');
+ const isStart = (serviceHealth === 'STARTED');
+ const serviceName = this.get('content.serviceName');
+ const serviceGroupName = this.get('content.serviceGroupName');
+
if (components || hosts) {
batchUtils.getComponentsFromServer({
hosts,
@@ -598,6 +611,7 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
data: {
context,
serviceName: serviceName.toUpperCase(),
+ serviceGroupName: serviceGroupName,
state: serviceHealth,
query: requestQuery
},
@@ -611,6 +625,7 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
data = {
context,
serviceName: serviceName.toUpperCase(),
+ serviceGroupName: serviceGroupName,
ServiceInfo: {
state: serviceHealth
},
@@ -1059,10 +1074,11 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
runSmokeTestPrimary: function(query) {
var clusterLevelRequired = ['KERBEROS'];
var requestData = {
- 'serviceName': this.get('content.serviceName'),
- 'displayName': this.get('content.displayName'),
- 'actionName': this.get('content.serviceName') === 'ZOOKEEPER' ? 'ZOOKEEPER_QUORUM_SERVICE_CHECK' : this.get('content.serviceName') + '_SERVICE_CHECK',
- 'query': query
+ 'serviceName': this.get('content.serviceName'),
+ 'serviceGroupName': this.get('content.serviceGroupName'),
+ 'displayName': this.get('content.displayName'),
+ 'actionName': this.get('content.serviceName') === 'ZOOKEEPER' ? 'ZOOKEEPER_QUORUM_SERVICE_CHECK' : this.get('content.serviceName') + '_SERVICE_CHECK',
+ 'query': query
};
if (clusterLevelRequired.contains(this.get('content.serviceName'))) {
requestData.operationLevel = {
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index 8195b67..d77af7f 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -273,7 +273,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
data: {
hostName: hostName,
passive_state: "ON",
- componentId: hostComponent.get('compId')
+ componentId: hostComponent.get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onTaskError'
@@ -460,7 +460,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
sender: this,
data: {
hostName: hostName,
- componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onDeleteHostComponentsError'
@@ -537,7 +537,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
context: "Start MySQL Server",
hostName: App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('hostName'),
serviceName: "HIVE",
- componentId: App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('componentId'),
HostRoles: {
state: "STARTED"
}
@@ -549,31 +549,35 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
restartMySqlServer: function() {
var context = "Restart MySql Server";
+ const component = App.HostComponent.find().filterProperty('componentName', 'MYSQL_SERVER');
+
+ if (component) {
+ var resource_filters = {
+ component_name: "MYSQL_SERVER",
+ hosts: component.get('firstObject.hostName'),
+ service_group_name: component.get('firstObject.serviceGroupName'),
+ service_name: "HIVE"
+ };
- var resource_filters = {
- component_name: "MYSQL_SERVER",
- hosts: App.HostComponent.find().filterProperty('componentName', 'MYSQL_SERVER').get('firstObject.hostName'),
- service_name: "HIVE"
- };
-
- var operation_level = {
- level: "HOST_COMPONENT",
- cluster_name: this.get('content.cluster.name'),
- service_name: "HIVE",
- hostcomponent_name: "MYSQL_SERVER"
- };
+ var operation_level = {
+ level: "HOST_COMPONENT",
+ cluster_name: this.get('content.cluster.name'),
+ service_name: "HIVE",
+ hostcomponent_name: "MYSQL_SERVER"
+ };
- App.ajax.send({
- name: 'restart.hostComponents',
- sender: this,
- data: {
- context: context,
- resource_filters: [resource_filters],
- operation_level: operation_level
- },
- success: 'startPolling',
- error: 'onTaskError'
- });
+ App.ajax.send({
+ name: 'restart.hostComponents',
+ sender: this,
+ data: {
+ context: context,
+ resource_filters: [resource_filters],
+ operation_level: operation_level
+ },
+ success: 'startPolling',
+ error: 'onTaskError'
+ });
+ }
},
startNewMySqlServer: function() {
@@ -584,7 +588,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
context: "Start MySQL Server",
hostName: this.get('content.reassignHosts.target'),
serviceName: "HIVE",
- componentId: App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('componentId'),
HostRoles: {
state: "STARTED"
}
diff --git a/ambari-web/app/controllers/main/service/reassign/step6_controller.js b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
index 36d83ed..9aa8875 100644
--- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
@@ -135,7 +135,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
sender: this,
data: {
hostName: hostName,
- componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onDeleteHostComponentsError'
@@ -164,7 +164,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
data: {
hostName: hostName,
passive_state: "ON",
- componentId: hostComponent.get('compId')
+ componentId: hostComponent.get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onTaskError'
@@ -198,7 +198,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
data.hostName = this.get('content.reassignHosts.source');
data.serviceName = 'HIVE';
data.HostRoles = { "state": "INSTALLED" };
- data.componentId = App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('compId');
+ data.componentId = App.HostComponent.find().findProperty('componentName', 'MYSQL_SERVER').get('componentId');
App.ajax.send({
name: 'common.host.host_component.update',
diff --git a/ambari-web/app/controllers/main/service/reassign/step7_controller.js b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
index 1782e0a..81f38a4 100644
--- a/ambari-web/app/controllers/main/service/reassign/step7_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
@@ -68,7 +68,7 @@ App.ReassignMasterWizardStep7Controller = App.ReassignMasterWizardStep4Controlle
data: {
hostName: hostName,
passive_state: "ON",
- componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onTaskError'
@@ -86,7 +86,7 @@ App.ReassignMasterWizardStep7Controller = App.ReassignMasterWizardStep4Controlle
sender: this,
data: {
hostName: hostName,
- componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', hostComponents[i]).get('componentId')
},
success: 'onComponentsTasksSuccess',
error: 'onDeleteHostComponentsError'
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js b/ambari-web/app/controllers/wizard/step9_controller.js
index b918a75..55397bb 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -525,7 +525,7 @@ App.WizardStep9Controller = App.WizardStepController.extend(App.ReloadPopupMixin
data.serviceGroup = sg;
return App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update', //TODO: This should change to use common.services.update.all when that is implemented on the back end.
sender: this,
data: data,
success: 'launchStartServicesSuccessCallback',
@@ -547,7 +547,7 @@ App.WizardStep9Controller = App.WizardStepController.extend(App.ReloadPopupMixin
data.serviceGroup = sg;
return App.ajax.send({
- name: 'common.services.update',
+ name: 'common.services.update', //TODO: This should change to use common.services.update.all when that is implemented on the back end.
sender: this,
data: data,
success: 'launchStartServicesSuccessCallback',
diff --git a/ambari-web/app/mappers/hosts_mapper.js b/ambari-web/app/mappers/hosts_mapper.js
index 6324f3a..698aeb8 100644
--- a/ambari-web/app/mappers/hosts_mapper.js
+++ b/ambari-web/app/mappers/hosts_mapper.js
@@ -59,9 +59,11 @@ App.hostsMapper = App.QuickDataMapper.create({
index: 'index'
},
hostComponentConfig: {
+ component_id: 'HostRoles.id',
component_name: 'HostRoles.component_name',
display_name: 'HostRoles.display_name',
service_id: 'HostRoles.service_name',
+ service_group_name: 'HostRoles.service_group_name',
passive_state: 'HostRoles.maintenance_state',
work_status: 'HostRoles.state',
stale_configs: 'HostRoles.stale_configs',
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index 3523379..e6cde57 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -23,6 +23,7 @@ App.serviceMapper = App.QuickDataMapper.create({
config: {
id: 'ServiceInfo.service_name',
service_name: 'ServiceInfo.service_name',
+ service_group_name: 'ServiceInfo.service_group_name',
work_status: 'ServiceInfo.state'
},
initialAppLoad: false,
@@ -41,6 +42,7 @@ App.serviceMapper = App.QuickDataMapper.create({
var serviceData = {
ServiceInfo: {
service_name: service.ServiceInfo.service_name,
+ service_group_name: service.ServiceInfo.service_group_name,
state: service.ServiceInfo.state
},
host_components: [],
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index 96f2196..9bfca28 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -192,7 +192,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
work_status: 'HostRoles.state',
passive_state: 'HostRoles.maintenance_state',
display_name: 'HostRoles.display_name',
- comp_id: 'HostRoles.id',
+ component_id: 'HostRoles.id',
component_name: 'HostRoles.component_name',
host_id: 'HostRoles.host_name',
host_name: 'HostRoles.host_name',
diff --git a/ambari-web/app/mappers/stack_mapper.js b/ambari-web/app/mappers/stack_mapper.js
index 09167e0..eb8f98d 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -134,6 +134,7 @@ App.stackMapper = App.QuickDataMapper.create({
id: service.name + '-' + stack.id,
name: service.name,
display_name: service.displayName,
+ service_group_name: service.serviceGroupName,
latest_version: service.versions ? service.versions[0] : ''
};
resultServices.push(this.parseIt(serviceObj, this.get('configService')));
diff --git a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
index bb05d39..1f87c1f 100644
--- a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
+++ b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
@@ -151,7 +151,7 @@ App.Decommissionable = Em.Mixin.create({
sender: this,
data: {
hostName: this.get('content.hostName'),
- componentId: this.get('content.compId')
+ componentId: this.get('content.componentId')
},
success: 'getDesiredAdminStateSuccessCallback',
error: 'getDesiredAdminStateErrorCallback'
diff --git a/ambari-web/app/mixins/main/host/details/host_components/install_component.js b/ambari-web/app/mixins/main/host/details/host_components/install_component.js
index 59b7d43..fc12ee9 100644
--- a/ambari-web/app/mixins/main/host/details/host_components/install_component.js
+++ b/ambari-web/app/mixins/main/host/details/host_components/install_component.js
@@ -68,7 +68,7 @@ App.InstallComponent = Em.Mixin.create({
sender: App.router.get('mainHostDetailsController'),
data: {
hostName: params.hostName,
- componentId: params.component.get('compId'),
+ componentId: params.component.get('componentId'),
serviceName: params.component.get('serviceName'),
component: params.component,
"context": Em.I18n.t('requestInfo.installNewHostComponent') + " " + params.component.get('displayName'),
diff --git a/ambari-web/app/mixins/main/host/details/support_client_configs_download.js b/ambari-web/app/mixins/main/host/details/support_client_configs_download.js
index 1430cde..0487cd8 100644
--- a/ambari-web/app/mixins/main/host/details/support_client_configs_download.js
+++ b/ambari-web/app/mixins/main/host/details/support_client_configs_download.js
@@ -52,7 +52,7 @@ App.SupportClientConfigsDownload = Em.Mixin.create({
_getUrl: function (hostName, serviceName, componentName, resourceType) {
var result;
var prefix = App.get('apiPrefix') + '/clusters/' + App.router.getClusterName() + '/';
- var componentId = App.HostComponent.find().findProperty('componentName', componentName).get('compId');
+ var componentId = App.HostComponent.find().findProperty('componentName', componentName).get('componentId');
switch (resourceType) {
case this.resourceTypeEnum.SERVICE_COMPONENT:
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 9c4dd05..4e06d9b 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
@@ -401,7 +401,7 @@ App.ComponentActionsByConfigs = Em.Mixin.create({
* @return {Object}
*/
getDeleteHostComponentRequest: function (hostName, component) {
- let componentId = App.HostComponent.find().findProperty('componentName', component).get('compId')
+ let componentId = App.HostComponent.find().findProperty('componentName', component).get('componentId')
return {
"type": 'DELETE',
"uri": "/clusters/" + App.get('clusterName') + "/hosts/" + hostName + "/host_components/" + componentId
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index fb39d47..e0f2a1f 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -433,6 +433,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
* @returns {$.ajax}
*/
stopServices: function (services, stopListedServicesFlag, stopAllServices) {
+ let call = 'common.services.update';
var stopAllServices = stopAllServices || false;
var stopListedServicesFlag = stopListedServicesFlag || false;
var data = {
@@ -442,6 +443,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
};
if (stopAllServices) {
data.context = "Stop all services";
+ call = 'common.services.update.all';
} else {
if(!services || !services.length) {
services = App.Service.find().mapProperty('serviceName').filter(function (service) {
@@ -460,7 +462,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
data.urlParams = "ServiceInfo/service_name.in(" + servicesList + ")";
}
return App.ajax.send({
- name: 'common.services.update',
+ name: call,
sender: this,
data: data,
success: 'startPolling',
@@ -480,6 +482,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
* @returns {$.ajax}
*/
startServices: function (runSmokeTest, services, startListedServicesFlag) {
+ let call = 'common.services.update';
var startListedServicesFlag = startListedServicesFlag || false;
var skipServiceCheck = App.router.get('clusterController.ambariProperties')['skip.service.checks'] === "true";
var data = {
@@ -500,6 +503,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
data.urlParams = "ServiceInfo/service_name.in(" + servicesList + ")";
} else {
data.context = "Start all services";
+ call = 'common.services.update.all';
}
if (runSmokeTest) {
@@ -508,7 +512,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
}
return App.ajax.send({
- name: 'common.services.update',
+ name: call,
sender: this,
data: data,
success: 'startPolling',
@@ -643,7 +647,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
/**
* Update state for array of components of different services and on different hosts
*
- * @param {Array} components - array of components object with fields serviceName, hostName and componentName
+ * @param {Array} components - array of components object with fields serviceName, hostName and componentName, and componentId
* @param {String} state - new state to update
*/
updateComponentsState: function (components, state) {
@@ -654,7 +658,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
data: {
hostName: component.hostName,
serviceName: component.serviceName,
- componentId: component.id,
+ componentId: component.componentId,
HostRoles: {
state: state
},
@@ -768,7 +772,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
name: 'common.delete.host_component',
sender: this,
data: {
- componentId: App.HostComponent.find().findProperty('componentName', componentName).get('compId'),
+ componentId: App.HostComponent.find().findProperty('componentName', componentName).get('componentId'),
hostName: hostName
},
success: 'onTaskCompleted',
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 255a929..7c412c2 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -19,11 +19,13 @@
var App = require('app');
App.HostComponent = DS.Model.extend({
+ componentId: DS.attr('string'),
workStatus: DS.attr('string'),
passiveState: DS.attr('string'),
- compId: DS.attr('string'),
componentName: DS.attr('string'),
displayName: DS.attr('string'),
+ serviceName: DS.attr('string'),
+ serviceGroupName: DS.attr('string'),
haStatus: DS.attr('string'),
displayNameAdvanced: DS.attr('string'),
staleConfigs: DS.attr('boolean'),
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index fa7d30c..0c6a64d 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -23,6 +23,7 @@ require('utils/config');
App.Service = DS.Model.extend({
serviceName: DS.attr('string'),
displayName: Em.computed.formatRole('serviceName', true),
+ serviceGroupName: DS.attr('string'),
passiveState: DS.attr('string', {defaultValue: "OFF"}),
workStatus: DS.attr('string'),
rand: DS.attr('string'),
diff --git a/ambari-web/app/styles/dashrow.less b/ambari-web/app/styles/dashrow.less
index 4d7c064..950e43a 100644
--- a/ambari-web/app/styles/dashrow.less
+++ b/ambari-web/app/styles/dashrow.less
@@ -91,8 +91,8 @@
}
}
}
+
+ .open .dropdown-menu {
+ display: block;
+ }
}
-
-.open .dropdown-menu {
- display: block;
-}
\ No newline at end of file
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index a296ca9..15a235c 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -56,6 +56,27 @@ var urls = {
}
},
+ 'common.services.update.all' : {
+ 'real': '/clusters/{clusterName}/servicegroups?{urlParams}',
+ 'format': function (data) {
+ return {
+ type: 'PUT',
+ data: JSON.stringify({
+ RequestInfo: {
+ "context": data.context,
+ "operation_level": {
+ "level": "CLUSTER",
+ "cluster_name" : data.clusterName
+ }
+ },
+ Body: {
+ ServiceInfo: data.ServiceInfo
+ }
+ })
+ };
+ }
+ },
+
'common.services.update' : {
'real': '/clusters/{clusterName}/servicegroups/{serviceGroup}/services?{urlParams}',
'mock': '/data/wizard/deploy/poll_1.json',
@@ -79,7 +100,7 @@ var urls = {
},
'common.service.update' : {
- 'real': '/clusters/{clusterName}/servicegroups/{defaultServiceGroupName}/services/{serviceName}',
+ 'real': '/clusters/{clusterName}/servicegroups/{serviceGroupName}/services/{serviceName}',
'mock': '/data/wizard/deploy/poll_1.json',
'format': function (data) {
return {
@@ -608,7 +629,12 @@ var urls = {
"context": data.displayName + " Service Check",
"command": data.actionName
},
- "Requests/resource_filters": [{"service_name": data.serviceName}]
+ "Requests/resource_filters": [
+ {
+ "service_name": data.serviceName,
+ "service_group_name": data.serviceGroupName
+ }
+ ]
};
if (data.operationLevel) {
requestData.RequestInfo.operation_level = data.operationLevel;
diff --git a/ambari-web/app/utils/batch_scheduled_requests.js b/ambari-web/app/utils/batch_scheduled_requests.js
index 0e5a58f..be7e9fb 100644
--- a/ambari-web/app/utils/batch_scheduled_requests.js
+++ b/ambari-web/app/utils/batch_scheduled_requests.js
@@ -113,6 +113,7 @@ module.exports = {
data.items.forEach(host => {
host.host_components.forEach(hostComponent => {
hostComponents.push(Em.Object.create({
+ serviceGroupName: hostComponent.HostRoles.service_group_name,
componentName: hostComponent.HostRoles.component_name,
hostName: host.Hosts.host_name
}));
@@ -171,7 +172,6 @@ module.exports = {
fields += displayParam;
fields += (array.length === (index + 1)) ? '' : ",";
});
- fields += '&minimal_response=true';
return {fields: fields.substring(1, fields.length), params: params};
},
@@ -222,35 +222,52 @@ module.exports = {
* ...
* }
*/
- var componentToHostsMap = {};
- var hosts = [];
- hostComponentsList.forEach(function(hc) {
- var hostName = hc.get('hostName');
- var componentName = hc.get('componentName');
+ const componentToHostsMap = {};
+ const componentToServiceGroupsMap = {};
+
+ hostComponentsList.forEach(function (hc) {
+ const componentName = hc.get('componentName');
+
+ const serviceGroupName = hc.get('serviceGroupName');
+ if (!componentToServiceGroupsMap[componentName]) {
+ componentToServiceGroupsMap[componentName] = [];
+ }
+ componentToServiceGroupsMap[componentName].push(serviceGroupName);
+
+ const hostName = hc.get('hostName');
if (!componentToHostsMap[componentName]) {
componentToHostsMap[componentName] = [];
}
componentToHostsMap[componentName].push(hostName);
- hosts.push(hostName);
});
- var resource_filters = [];
- for (var componentName in componentToHostsMap) {
- if (componentToHostsMap.hasOwnProperty(componentName)) {
- resource_filters.push({
- service_name: App.StackServiceComponent.find(componentName).get('serviceName'),
- component_name: componentName,
- hosts: componentToHostsMap[componentName].join(",")
- });
+
+ const resource_filters = [];
+
+ for (let componentName in componentToServiceGroupsMap) {
+ if (componentToServiceGroupsMap.hasOwnProperty(componentName)) {
+ const component = App.StackServiceComponent.find(componentName);
+ if (component) {
+ const serviceName = component.get('serviceName');
+
+ const serviceGroups = componentToServiceGroupsMap[componentName];
+ serviceGroups.forEach(serviceGroupName => {
+ resource_filters.push({
+ service_name: serviceName,
+ service_group_name: serviceGroupName,
+ component_name: componentName,
+ hosts: componentToHostsMap[componentName].join(",")
+ });
+ });
+ }
}
}
+
if (hostComponentsList.length > 0) {
var serviceComponentName = hostComponentsList[0].get("componentName");
var serviceName = App.StackServiceComponent.find(serviceComponentName).get('serviceName');
- var operation_level = this.getOperationLevelObject(level, serviceName,
- serviceComponentName);
+ var operation_level = this.getOperationLevelObject(level, serviceName, serviceComponentName);
}
-
if (resource_filters.length) {
App.ajax.send({
name: 'restart.hostComponents',
@@ -352,18 +369,21 @@ module.exports = {
* @returns {Array} list of batches
*/
getBatchesForRollingRestartRequest: function(restartHostComponents, batchSize) {
- var hostIndex = 0,
- batches = [],
- batchCount = Math.ceil(restartHostComponents.length / batchSize),
- sampleHostComponent = restartHostComponents.objectAt(0),
- componentName = sampleHostComponent.get('componentName'),
- serviceName = sampleHostComponent.get('serviceName');
-
- for ( var count = 0; count < batchCount; count++) {
+ let hostIndex = 0;
+ const batches = [];
+ const batchCount = Math.ceil(restartHostComponents.length / batchSize);
+ const sampleHostComponent = restartHostComponents.objectAt(0);
+ const componentName = sampleHostComponent.get('componentName');
+ const serviceName = sampleHostComponent.get('serviceName');
+ const serviceGroupName = sampleHostComponent.get('serviceGroupName');
+
+ for (var count = 0; count < batchCount; count++) {
var hostNames = [];
- for ( var hc = 0; hc < batchSize && hostIndex < restartHostComponents.length; hc++) {
+
+ for (var hc = 0; hc < batchSize && hostIndex < restartHostComponents.length; hc++) {
hostNames.push(restartHostComponents.objectAt(hostIndex++).get('hostName'));
}
+
if (hostNames.length) {
batches.push({
"order_id" : count + 1,
@@ -375,7 +395,8 @@ module.exports = {
"command" : "RESTART"
},
"Requests/resource_filters": [{
- "service_name" : serviceName,
+ "service_name": serviceName,
+ "service_group_name": serviceGroupName,
"component_name" : componentName,
"hosts" : hostNames.join(",")
}]
diff --git a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
index 25bf36e..fa0969d 100644
--- a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
@@ -37,7 +37,7 @@ App.DataNodeComponentView = App.HostComponentView.extend(App.Decommissionable, {
sender: this,
data: {
hostName: activeNNHostName,
- componentId: App.HostComponent.find().findProperty('componentName', componentForCheckDecommission).get('compId')
+ componentId: App.HostComponent.find().findProperty('componentName', componentForCheckDecommission).get('componentId')
},
success: 'getDNDecommissionStatusSuccessCallback',
error: 'getDNDecommissionStatusErrorCallback'
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js
index 692d94d..f8da60c 100644
--- a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js
@@ -43,7 +43,7 @@ App.ChartServiceFlumeMetricGraph = App.ChartLinearTimeView.extend({
getDataForAjaxRequest: function() {
var data = this._super();
- var flumeId = App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('compId');
+ var flumeId = App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('componentId');
var urlFields = '';
this.get('metricItems').forEach(function (metricItem, index) {
urlFields += index === 0 ? '' : ',';
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
index 2c9c428..bbffa2c 100644
--- a/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graphs.js
@@ -35,7 +35,7 @@ App.MainServiceInfoFlumeGraphsView = App.MainServiceInfoSummaryMetricGraphsView.
'data': {
hostName: hostName,
flumeComponent: metricType,
- flumeId: App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('compId')
+ flumeId: App.HostComponent.find().findProperty('componentName', 'FLUME_HANDLER').get('componentId')
}
});
}
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
index 199dd41..4417673 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
@@ -123,7 +123,7 @@ describe('App.HighAvailabilityWizardStep4Controller', function() {
describe('#pullCheckPointStatus', function() {
it('App.ajax.send should be called', function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'componentId': '1'})]);
controller.set('content.masterComponentHosts', [
{
component: 'NAMENODE',
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step5_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step5_controller_test.js
index 177d460..15df9a8 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step5_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step5_controller_test.js
@@ -87,7 +87,7 @@ describe('App.HighAvailabilityWizardStep5Controller', function() {
describe('#disableSNameNode', function() {
it('App.ajax.send should be called', function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'SECONDARY_NAMENODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'SECONDARY_NAMENODE', 'componentId': '1'})]);
controller.set('content.masterComponentHosts', [
{
component: 'SECONDARY_NAMENODE',
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step6_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step6_controller_test.js
index 2a453ee..8f8a884 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step6_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step6_controller_test.js
@@ -90,7 +90,7 @@ describe('App.HighAvailabilityWizardStep6Controller', function() {
describe('#pullEachJnStatus', function() {
it('App.ajax.send should be called', function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'JOURNALNODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'JOURNALNODE', 'componentId': '1'})]);
controller.pullEachJnStatus('host1');
var args = testHelpers.findAjaxRequest('name', 'admin.high_availability.getJnCheckPointStatus');
expect(args[0]).to.be.eql({
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step9_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step9_controller_test.js
index 9468c79..a2067af 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step9_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step9_controller_test.js
@@ -319,7 +319,7 @@ describe('App.HighAvailabilityWizardStep9Controller', function() {
describe('#deleteSNameNode', function() {
it('App.ajax.send should be called', function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'SECONDARY_NAMENODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'SECONDARY_NAMENODE', 'componentId': '1'})]);
controller.set('content.masterComponentHosts', [
{
component: 'SECONDARY_NAMENODE',
diff --git a/ambari-web/test/controllers/main/admin/kerberos/step6_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step6_controller_test.js
index 8b17772..7e442b3 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step6_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step6_controller_test.js
@@ -66,9 +66,9 @@ describe('App.KerberosWizardStep6Controller', function() {
it("App.ajax.send should be called", function() {
controller.stopServices();
- var args = testHelpers.findAjaxRequest('name', 'common.services.update');
+ var args = testHelpers.findAjaxRequest('name', 'common.services.update.all');
expect(args[0]).to.be.eql({
- name: 'common.services.update',
+ name: 'common.services.update.all',
data: {
context: "Stop services",
"ServiceInfo": {
@@ -103,7 +103,7 @@ describe('App.KerberosWizardStep6Controller', function() {
beforeEach(function() {
sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({
componentName: 'APP_TIMELINE_SERVER',
- compId: '1',
+ componentId: '1',
hostName: 'host1'
})]);
});
diff --git a/ambari-web/test/controllers/main/admin/service_auto_start_test.js b/ambari-web/test/controllers/main/admin/service_auto_start_test.js
index 55f1809..7819012 100644
--- a/ambari-web/test/controllers/main/admin/service_auto_start_test.js
+++ b/ambari-web/test/controllers/main/admin/service_auto_start_test.js
@@ -81,16 +81,10 @@ describe('App.MainAdminServiceAutoStartController', function() {
})
};
beforeEach(function() {
- sinon.stub(controller, 'loadClusterConfig').returns({
+ sinon.stub(controller, 'loadClusterSettings').returns({
done: function(callback) {
callback({
- Clusters: {
- desired_configs: {
- 'cluster-env': {
- tag: 1
- }
- }
- }
+ recovery_enabled: 'true'
});
}
});
@@ -101,7 +95,7 @@ describe('App.MainAdminServiceAutoStartController', function() {
controller.load();
});
afterEach(function() {
- controller.loadClusterConfig.restore();
+ controller.loadClusterSettings.restore();
App.router.get.restore();
controller.loadComponentsConfigs.restore();
});
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index f3f3b9d..3951953 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -133,7 +133,7 @@ describe('App.MainHostDetailsController', function () {
describe("#pullNnCheckPointTime()", function() {
it("valid request is sent", function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'componentId': '1'})]);
controller.pullNnCheckPointTime('host1');
var args = testHelpers.findAjaxRequest('name', 'common.host_component.getNnCheckPointTime');
expect(args[0]).to.exists;
@@ -154,7 +154,7 @@ describe('App.MainHostDetailsController', function () {
controller.set('content.hostName', 'host1');
component = Em.Object.create({
service: {serviceName: 'S1'},
- componentName: 'COMP1'
+ componentId: 'COMP1'
});
controller.sendComponentCommand(component, {}, 'state');
@@ -175,7 +175,7 @@ describe('App.MainHostDetailsController', function () {
"HostRoles": {
"state": "state"
},
- "componentName": "COMP1",
+ "componentId": "COMP1",
"serviceName": "S1"
});
});
@@ -188,11 +188,11 @@ describe('App.MainHostDetailsController', function () {
component = [
Em.Object.create({
service: {serviceName: 'S1'},
- componentName: 'COMP1'
+ componentId: 'COMP1'
}),
Em.Object.create({
service: {serviceName: 'S1'},
- componentName: 'COMP2'
+ componentId: 'COMP2'
})
];
controller.sendComponentCommand(component, {}, 'state');
@@ -213,7 +213,7 @@ describe('App.MainHostDetailsController', function () {
"HostRoles": {
"state": "state"
},
- "query": "HostRoles/component_name.in(COMP1,COMP2)"
+ "query": "HostRoles/id.in(COMP1,COMP2)"
});
});
});
@@ -2709,7 +2709,7 @@ describe('App.MainHostDetailsController', function () {
});
it('single component', function () {
- this.mock.returns([Em.Object.create({'componentName': 'COMP', 'compId': '1'})]);
+ this.mock.returns([Em.Object.create({'componentName': 'COMP', 'componentId': '1'})]);
controller.set('content.hostName', 'host1');
var componentName = 'COMP';
controller._doDeleteHostComponent(componentName);
@@ -2842,7 +2842,7 @@ describe('App.MainHostDetailsController', function () {
it('popup should be displayed', function () {
controller.set('content.hostName', 'host1');
var component = Em.Object.create({
- compId: '1'
+ componentId: '1'
});
controller.updateComponentPassiveState(component, 'state', 'message');
var args = testHelpers.findAjaxRequest('name', 'common.host.host_component.passive');
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 c7ba3b7..7415cdd 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
@@ -712,8 +712,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
});
it('delete two components', function () {
sinon.stub(App.HostComponent, 'find').returns([
- Em.Object.create({'componentName': 'COMP1', 'compId': '1'}),
- Em.Object.create({'componentName': 'COMP2', 'compId': '2'})
+ Em.Object.create({'componentName': 'COMP1', 'componentId': '1'}),
+ Em.Object.create({'componentName': 'COMP2', 'componentId': '2'})
]);
controller.set('hostComponents', ["COMP1", "COMP2"]);
controller.set('content.reassignHosts.source', 'host1');
@@ -956,7 +956,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
sinon.stub(App.HostComponent, 'find').returns([
Em.Object.create({
componentName: 'MYSQL_SERVER',
- compId: '1',
+ componentId: '1',
hostName: 'host1'
})
]);
@@ -986,7 +986,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
sinon.stub(App.HostComponent, 'find').returns([
Em.Object.create({
componentName: 'MYSQL_SERVER',
- hostName: 'host1'
+ hostName: 'host1',
+ serviceGroupName: 'SG1'
})
]);
});
@@ -1008,7 +1009,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
resource_filters: [{
component_name: "MYSQL_SERVER",
hosts: 'host1',
- service_name: "HIVE"
+ service_name: "HIVE",
+ service_group_name: 'SG1'
}],
operation_level: {
level: "HOST_COMPONENT",
@@ -1023,7 +1025,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
describe("#startNewMySqlServer()", function() {
beforeEach(function () {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'MYSQL_SERVER', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'MYSQL_SERVER', 'componentId': '1'})]);
controller.set('content', Em.Object.create({
reassignHosts: Em.Object.create({
target: 'host1'
diff --git a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
index 64f17f8..467a53e 100644
--- a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
@@ -245,8 +245,8 @@ describe('App.ReassignMasterWizardStep6Controller', function () {
});
it('delete two components', function () {
sinon.stub(App.HostComponent, 'find').returns([
- Em.Object.create({'componentName': 'COMP1', 'compId': '1'}),
- Em.Object.create({'componentName': 'COMP2', 'compId': '2'})
+ Em.Object.create({'componentName': 'COMP1', 'componentId': '1'}),
+ Em.Object.create({'componentName': 'COMP2', 'componentId': '2'})
]);
controller.set('hostComponents', ['COMP1', 'COMP2']);
controller.set('content.reassignHosts.source', 'host1');
@@ -293,7 +293,7 @@ describe('App.ReassignMasterWizardStep6Controller', function () {
describe('#stopMysqlService()', function () {
it('stopMysqlService', function () {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'MYSQL_SERVER', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'MYSQL_SERVER', 'componentId': '1'})]);
controller.stopMysqlService();
var args = testHelpers.findAjaxRequest('name', 'common.host.host_component.update');
expect(args[0]).exists;
diff --git a/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
index 0257f59..5a9eeb9 100644
--- a/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
@@ -45,8 +45,8 @@ describe('App.ReassignMasterWizardStep7Controller', function () {
describe("#putHostComponentsInMaintenanceMode()", function() {
beforeEach(function(){
sinon.stub(App.HostComponent, 'find').returns([
- Em.Object.create({'componentName': 'C1', 'compId': '1'}),
- Em.Object.create({'componentName': 'C2', 'compId': '2'})
+ Em.Object.create({'componentName': 'C1', 'componentId': '1'}),
+ Em.Object.create({'componentName': 'C2', 'componentId': '2'})
]);
});
afterEach(function(){
@@ -85,8 +85,8 @@ describe('App.ReassignMasterWizardStep7Controller', function () {
describe("#deleteHostComponents()", function() {
beforeEach(function(){
sinon.stub(App.HostComponent, 'find').returns([
- Em.Object.create({'componentName': 'C1', 'compId': '1'}),
- Em.Object.create({'componentName': 'C2', 'compId': '2'})
+ Em.Object.create({'componentName': 'C1', 'componentId': '1'}),
+ Em.Object.create({'componentName': 'C2', 'componentId': '2'})
]);
});
afterEach(function(){
diff --git a/ambari-web/test/controllers/main/service_test.js b/ambari-web/test/controllers/main/service_test.js
index 8c1e556..b6dc2c6 100644
--- a/ambari-web/test/controllers/main/service_test.js
+++ b/ambari-web/test/controllers/main/service_test.js
@@ -327,7 +327,7 @@ describe('App.MainServiceController', function () {
return Em.get(App, k);
});
mainServiceController.allServicesCall(state, query);
- var args = testHelpers.findAjaxRequest('name', 'common.services.update');
+ var args = testHelpers.findAjaxRequest('name', 'common.services.update.all');
this.params = App.ajax.fakeGetUrl('common.services.update').format(args[0].data);
this.data = JSON.parse(this.params.data);
});
@@ -452,9 +452,9 @@ describe('App.MainServiceController', function () {
it("App.ajax.send should be called", function() {
mainServiceController.silentStopAllServices();
- var args = testHelpers.filterAjaxRequests('name', 'common.services.update');
+ var args = testHelpers.filterAjaxRequests('name', 'common.services.update.all');
expect(args[0][0]).to.eql({
- name: 'common.services.update',
+ name: 'common.services.update.all',
sender: mainServiceController,
data: {
context: App.BackgroundOperationsController.CommandContexts.STOP_ALL_SERVICES,
@@ -560,7 +560,7 @@ describe('App.MainServiceController', function () {
allOperationsCount: 1
}));
mainServiceController.silentStartAllServices();
- expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
+ expect(testHelpers.findAjaxRequest('name', 'common.services.update.all')).to.be.undefined;
});
it("shouldStart is false", function() {
@@ -569,7 +569,7 @@ describe('App.MainServiceController', function () {
}));
mainServiceController.set('shouldStart', false);
mainServiceController.silentStartAllServices();
- expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
+ expect(testHelpers.findAjaxRequest('name', 'common.services.update.all')).to.be.undefined;
});
it("isStopAllServicesFailed returns true", function() {
@@ -579,7 +579,7 @@ describe('App.MainServiceController', function () {
mainServiceController.set('shouldStart', true);
this.mock.returns(true);
mainServiceController.silentStartAllServices();
- expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
+ expect(testHelpers.findAjaxRequest('name', 'common.services.update.all')).to.be.undefined;
});
it("App.ajax.send should be called", function() {
@@ -589,9 +589,9 @@ describe('App.MainServiceController', function () {
mainServiceController.set('shouldStart', true);
this.mock.returns(false);
mainServiceController.silentStartAllServices();
- var args = testHelpers.filterAjaxRequests('name', 'common.services.update');
+ var args = testHelpers.filterAjaxRequests('name', 'common.services.update.all');
expect(args[0][0]).to.be.eql({
- name: 'common.services.update',
+ name: 'common.services.update.all',
sender: mainServiceController,
data: {
context: App.BackgroundOperationsController.CommandContexts.START_ALL_SERVICES,
diff --git a/ambari-web/test/mixins/main/host/details/host_components/install_component_test.js b/ambari-web/test/mixins/main/host/details/host_components/install_component_test.js
index 054a07f..2da4da7 100644
--- a/ambari-web/test/mixins/main/host/details/host_components/install_component_test.js
+++ b/ambari-web/test/mixins/main/host/details/host_components/install_component_test.js
@@ -74,7 +74,7 @@ describe('App.InstallComponent', function () {
var params = {
hostName: 'host1',
component: Em.Object.create({
- compId: '1',
+ componentId: '1',
serviceName: 'S1',
displayName: 'c1'
})
diff --git a/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js b/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
index a1f7619..5044f64 100644
--- a/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
+++ b/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
@@ -430,7 +430,7 @@ describe('App.ComponentActionsByConfigs', function () {
describe("#getDeleteHostComponentRequest()", function () {
it("should return request object", function() {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'C1', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'C1', 'componentId': '1'})]);
expect(mixin.getDeleteHostComponentRequest('host1', 'C1')).to.be.eql({
"type": 'DELETE',
"uri": "/clusters/mycluster/hosts/host1/host_components/1"
diff --git a/ambari-web/test/views/main/host/details/host_component_views/datanode_view_test.js b/ambari-web/test/views/main/host/details/host_component_views/datanode_view_test.js
index d924a35..74a33b7 100644
--- a/ambari-web/test/views/main/host/details/host_component_views/datanode_view_test.js
+++ b/ambari-web/test/views/main/host/details/host_component_views/datanode_view_test.js
@@ -30,7 +30,7 @@ describe('App.DataNodeComponentView', function () {
describe("#getDNDecommissionStatus()", function () {
beforeEach(function () {
- sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'compId': '1'})]);
+ sinon.stub(App.HostComponent, 'find').returns([Em.Object.create({'componentName': 'NAMENODE', 'componentId': '1'})]);
this.stub = sinon.stub(App.HDFSService, 'find');
});
diff --git a/ambari-web/test/views/main/host/details/host_component_views/decommissionable_test.js b/ambari-web/test/views/main/host/details/host_component_views/decommissionable_test.js
index 2b286e7..ae53051 100644
--- a/ambari-web/test/views/main/host/details/host_component_views/decommissionable_test.js
+++ b/ambari-web/test/views/main/host/details/host_component_views/decommissionable_test.js
@@ -237,7 +237,7 @@ describe('App.Decommissionable', function() {
hostComponentView = Em.View.create(App.Decommissionable, {
content: Em.Object.create({
hostName: 'host1',
- compId: '1'
+ componentId: '1'
})
});
hostComponentView.getDesiredAdminState();
--
To stop receiving notification emails like this one, please contact
jgolieb@apache.org.