You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/07/15 06:01:02 UTC
[1/2] ambari git commit: AMBARI-17713. Install packages: status icon
and progress percentage aren't being updated (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 433286dc6 -> 3c4595e7a
AMBARI-17713. Install packages: status icon and progress percentage aren't being updated
(alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c4595e7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c4595e7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c4595e7
Branch: refs/heads/trunk
Commit: 3c4595e7a8c2d29b2f661d03fd4bf586ea52a225
Parents: f85e55c
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Jul 14 18:12:13 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jul 15 09:00:57 2016 +0300
----------------------------------------------------------------------
.../progress_popup_controller.js | 27 ++++++++++++++++++--
.../progress_popup_controller_test.js | 26 +++++++++++++++++--
2 files changed, 49 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c4595e7/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js
index 06dd1cd..7231e5c 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_popup_controller.js
@@ -105,7 +105,7 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({
/**
* Send AJAX request to get hosts tasks data
*/
- getHosts: function () {
+ getHosts: function (successCallback) {
var requestIds = this.get('requestIds');
var stageId = this.get('stageId');
var name = 'background_operations.get_by_request';
@@ -115,6 +115,9 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({
stageId = '0';
}
}
+ if (Em.isNone(successCallback)) {
+ successCallback = 'onGetHostsSuccess';
+ }
requestIds.forEach(function (requestId) {
App.ajax.send({
name: name,
@@ -123,10 +126,27 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({
requestId: requestId,
stageId: stageId
},
- success: 'onGetHostsSuccess'
+ success: successCallback
})
}, this);
},
+
+ doPolling: function () {
+ var self = this;
+ this.set('progressController.logs', []);
+ setTimeout(function () {
+ self.getHosts('doPollingSuccessCallback');
+ }, App.bgOperationsUpdateInterval);
+ },
+
+ doPollingSuccessCallback: function (data) {
+ this.set('hostsData', [data]);
+ var hostsData = this.get('hostsData');
+ this.set('progressController.logs', data.tasks);
+ if (this.isRequestRunning(hostsData)) {
+ this.doPolling();
+ }
+ },
/**
* Callback for <code>getHosts</code> request
@@ -140,6 +160,9 @@ App.HighAvailabilityProgressPopupController = Ember.Controller.extend({
this.calculateHostsData(hostsData);
App.HostPopup.initPopup(popupTitle, this);
if (this.isRequestRunning(hostsData)) {
+ if (this.get('progressController.name') === 'mainAdminStackAndUpgradeController') {
+ this.doPolling();
+ }
this.addObserver('progressController.logs.length', this, 'getDataFromProgressController');
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c4595e7/ambari-web/test/controllers/main/admin/highAvailability/progress_popup_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/progress_popup_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/progress_popup_controller_test.js
index c7ee374..364d9b0 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/progress_popup_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/progress_popup_controller_test.js
@@ -168,18 +168,23 @@ describe('App.HighAvailabilityProgressPopupController', function () {
var cases = [
{
name: 'background_operations.get_by_request',
+ success: 'onGetHostsSuccess',
title: 'default background operation polling'
},
{
stageId: 0,
name: 'common.request.polling',
stageIdPassed: '0',
+ successCallback: 's',
+ success: 's',
title: 'polling by stage, stageId = 0'
},
{
stageId: 1,
name: 'common.request.polling',
stageIdPassed: 1,
+ successCallback: null,
+ success: 'onGetHostsSuccess',
title: 'polling by stage'
}
];
@@ -192,7 +197,7 @@ describe('App.HighAvailabilityProgressPopupController', function () {
requestIds: [1, 2],
stageId: item.stageId
});
- controller.getHosts();
+ controller.getHosts(item.successCallback);
this.bgArgs = testHelpers.filterAjaxRequests('name', 'background_operations.get_by_request');
this.pollingArgs = testHelpers.filterAjaxRequests('name', 'common.request.polling');
this.args = item.name === 'background_operations.get_by_request' ? this.bgArgs : this.pollingArgs;
@@ -218,6 +223,14 @@ describe('App.HighAvailabilityProgressPopupController', function () {
expect(this.args[1][0].data.stageId).to.eql(item.stageIdPassed);
});
+ it('success callback for first request', function () {
+ expect(this.args[0][0].success).to.equal(item.success);
+ });
+
+ it('success callback for second request', function () {
+ expect(this.args[1][0].success).to.equal(item.success);
+ });
+
});
});
@@ -269,12 +282,16 @@ describe('App.HighAvailabilityProgressPopupController', function () {
sinon.stub(App.HostPopup, 'initPopup');
sinon.stub(controller, 'isRequestRunning').returns(true);
sinon.stub(controller, 'addObserver');
+ sinon.stub(controller, 'doPolling');
sinon.stub(spinner, 'hide');
controller.setProperties({
requestIds: [1],
hostsData: [],
popupTitle: 'popupTitle',
- spinnerPopup: spinner
+ spinnerPopup: spinner,
+ progressController: {
+ name: 'mainAdminStackAndUpgradeController'
+ }
});
controller.onGetHostsSuccess({});
});
@@ -284,6 +301,7 @@ describe('App.HighAvailabilityProgressPopupController', function () {
App.HostPopup.initPopup.restore();
controller.isRequestRunning.restore();
controller.addObserver.restore();
+ controller.doPolling.restore();
spinner.hide.restore();
});
@@ -302,6 +320,10 @@ describe('App.HighAvailabilityProgressPopupController', function () {
it("spinnerPopup.hide should be called", function() {
expect(spinner.hide.calledOnce).to.be.true;
});
+
+ it("doPolling should be called", function() {
+ expect(controller.doPolling.calledOnce).to.be.true;
+ });
});
describe("#calculateHostsData()", function () {
[2/2] ambari git commit: AMBARI-17712. Yarn quicklinks have incorrect
ports in ambari (alexantonenko)
Posted by al...@apache.org.
AMBARI-17712. Yarn quicklinks have incorrect ports in ambari (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f85e55c1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f85e55c1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f85e55c1
Branch: refs/heads/trunk
Commit: f85e55c1812a1130f147e7ab7c128a026052e474
Parents: 433286d
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Jul 14 17:36:49 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jul 15 09:00:57 2016 +0300
----------------------------------------------------------------------
.../HDP/2.0.6/services/YARN/quicklinks/quicklinks.json | 12 ++++++------
.../HDP/2.3/services/YARN/quicklinks/quicklinks.json | 12 ++++++------
ambari-server/src/test/resources/parent_quicklinks.json | 12 ++++++------
.../app/assets/data/configurations/quicklinks.json | 12 ++++++------
.../assets/data/configurations/quicklinks_services.json | 12 ++++++------
5 files changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f85e55c1/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
index 4d17706..37248d0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
@@ -37,9 +37,9 @@
"component_name": "RESOURCEMANAGER",
"url": "%@://%@:%@/logs",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -52,9 +52,9 @@
"component_name": "RESOURCEMANAGER",
"url":"%@://%@:%@/jmx",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -67,9 +67,9 @@
"component_name": "RESOURCEMANAGER",
"url":"%@://%@:%@/stacks",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
http://git-wip-us.apache.org/repos/asf/ambari/blob/f85e55c1/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
index 56c54b8..0aca8e3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
@@ -35,9 +35,9 @@
"requires_user_name": "false",
"url": "%@://%@:%@/logs",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -49,9 +49,9 @@
"requires_user_name": "false",
"url":"%@://%@:%@/jmx",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -63,9 +63,9 @@
"requires_user_name": "false",
"url":"%@://%@:%@/stacks",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
http://git-wip-us.apache.org/repos/asf/ambari/blob/f85e55c1/ambari-server/src/test/resources/parent_quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/parent_quicklinks.json b/ambari-server/src/test/resources/parent_quicklinks.json
index 56c54b8..0aca8e3 100644
--- a/ambari-server/src/test/resources/parent_quicklinks.json
+++ b/ambari-server/src/test/resources/parent_quicklinks.json
@@ -35,9 +35,9 @@
"requires_user_name": "false",
"url": "%@://%@:%@/logs",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -49,9 +49,9 @@
"requires_user_name": "false",
"url":"%@://%@:%@/jmx",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
@@ -63,9 +63,9 @@
"requires_user_name": "false",
"url":"%@://%@:%@/stacks",
"port":{
- "http_property": "yarn.timeline-service.webapp.address",
+ "http_property": "yarn.resourcemanager.webapp.address",
"http_default_port": "8088",
- "https_property": "yarn.timeline-service.webapp.https.address",
+ "https_property": "yarn.resourcemanager.webapp.https.address",
"https_default_port": "8090",
"regex": "\\w*:(\\d+)",
"site": "yarn-site"
http://git-wip-us.apache.org/repos/asf/ambari/blob/f85e55c1/ambari-web/app/assets/data/configurations/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/configurations/quicklinks.json b/ambari-web/app/assets/data/configurations/quicklinks.json
index 037645c..698c6c0 100644
--- a/ambari-web/app/assets/data/configurations/quicklinks.json
+++ b/ambari-web/app/assets/data/configurations/quicklinks.json
@@ -48,9 +48,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,
@@ -64,9 +64,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,
@@ -80,9 +80,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,
http://git-wip-us.apache.org/repos/asf/ambari/blob/f85e55c1/ambari-web/app/assets/data/configurations/quicklinks_services.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/configurations/quicklinks_services.json b/ambari-web/app/assets/data/configurations/quicklinks_services.json
index 64ef08b..7a7d5d6 100644
--- a/ambari-web/app/assets/data/configurations/quicklinks_services.json
+++ b/ambari-web/app/assets/data/configurations/quicklinks_services.json
@@ -58,9 +58,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,
@@ -75,9 +75,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,
@@ -92,9 +92,9 @@
"port" : {
"regex" : "\\w*:(\\d+)",
"site" : "yarn-site",
- "http_property" : "yarn.timeline-service.webapp.address",
+ "http_property" : "yarn.resourcemanager.webapp.address",
"http_default_port" : "8088",
- "https_property" : "yarn.timeline-service.webapp.https.address",
+ "https_property" : "yarn.resourcemanager.webapp.https.address",
"https_default_port" : "8090"
},
"removed" : false,