You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ro...@apache.org on 2018/08/03 10:19:00 UTC
[1/2] hadoop git commit: YARN-8603. [UI2] Latest run application
should be listed first in the RM UI. Contributed by Akhil PB.
Repository: hadoop
Updated Branches:
refs/heads/branch-3.1 619019ccc -> 4816d10dd
YARN-8603. [UI2] Latest run application should be listed first in the RM UI. Contributed by Akhil PB.
(cherry picked from commit 33482d35e802ac3468317b844122b347fe486861)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/83ccb75b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/83ccb75b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/83ccb75b
Branch: refs/heads/branch-3.1
Commit: 83ccb75b918fd9643f31202c6d189099ffa99229
Parents: 619019c
Author: Rohith Sharma K S <ro...@apache.org>
Authored: Fri Aug 3 13:58:41 2018 +0530
Committer: Rohith Sharma K S <ro...@apache.org>
Committed: Fri Aug 3 15:33:24 2018 +0530
----------------------------------------------------------------------
.../src/main/webapp/app/controllers/app-table-columns.js | 7 +++++++
.../src/main/webapp/app/controllers/yarn-apps/apps.js | 4 +++-
.../src/main/webapp/app/serializers/yarn-app.js | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/83ccb75b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js
index 33e3bb7..552a157 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/app-table-columns.js
@@ -20,6 +20,7 @@
import Ember from 'ember';
import ColumnDef from 'em-table/utils/column-definition';
import TableDef from 'em-table/utils/table-definition';
+import Converter from 'yarn-ui/utils/converter';
export default Ember.Controller.extend({
tableDefinition: TableDef.create({
@@ -83,6 +84,9 @@ export default Ember.Controller.extend({
headerTitle: 'Start Time',
contentPath: 'startTime',
facetType: null,
+ getCellContent: function(row) {
+ return Converter.timeStampToDate(row.get('startTime'));
+ }
}, {
id: 'elTime',
headerTitle: 'Elapsed Time',
@@ -169,6 +173,9 @@ export default Ember.Controller.extend({
headerTitle: 'Started Time',
contentPath: 'startTime',
facetType: null,
+ getCellContent: function(row) {
+ return Converter.timeStampToDate(row.get('startTime'));
+ }
}, {
id: 'finishTime',
headerTitle: 'Finished Time',
http://git-wip-us.apache.org/repos/asf/hadoop/blob/83ccb75b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
index 55d5a88..10965cf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
@@ -25,7 +25,9 @@ export default AppTableController.extend({
tableDefinition: TableDefinition.create({
searchType: 'manual',
enableFaceting: true,
- rowCount: 25
+ rowCount: 25,
+ sortColumnId: 'stTime',
+ sortOrder: 'desc'
}),
searchText: Ember.computed.alias('tableDefinition.searchText'),
sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'),
http://git-wip-us.apache.org/repos/asf/hadoop/blob/83ccb75b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
index 36d1260..f4de725 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
@@ -42,7 +42,7 @@ export default DS.JSONAPISerializer.extend({
user: payload.user,
queue: payload.queue,
state: payload.state,
- startTime: Converter.timeStampToDate(payload.startedTime),
+ startTime: payload.startedTime, // will be formatted in em-table
elapsedTime: payload.elapsedTime,
finishedTime: Converter.timeStampToDate(payload.finishedTime),
finalStatus: payload.finalStatus,
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org
[2/2] hadoop git commit: YARN-8608. [UI2] No information available
per application appAttempt about 'Total Outstanding Resource Requests'.
Contributed by Akhil PB.
Posted by ro...@apache.org.
YARN-8608. [UI2] No information available per application appAttempt about 'Total Outstanding Resource Requests'. Contributed by Akhil PB.
(cherry picked from commit 022592ae7941607091fa85e4a9e8608ba53f3814)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4816d10d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4816d10d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4816d10d
Branch: refs/heads/branch-3.1
Commit: 4816d10ddb730fd948f104c812549e5dba326295
Parents: 83ccb75
Author: Rohith Sharma K S <ro...@apache.org>
Authored: Fri Aug 3 13:59:34 2018 +0530
Committer: Rohith Sharma K S <ro...@apache.org>
Committed: Fri Aug 3 15:33:36 2018 +0530
----------------------------------------------------------------------
.../webapp/app/controllers/yarn-app/info.js | 45 ++++++++++++++------
.../src/main/webapp/app/templates/yarn-app.hbs | 11 +++--
.../main/webapp/app/templates/yarn-app/info.hbs | 19 +++++++--
3 files changed, 53 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4816d10d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/info.js
index bd8d50a..68954ce 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/info.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/info.js
@@ -35,16 +35,16 @@ export default Ember.Controller.extend({
Ember.$("#stopServiceConfirmDialog").modal('hide');
var adapter = this.store.adapterFor('yarn-servicedef');
self.set('isLoading', true);
- adapter.stopService(this.get('service'), this.get('model.app.user')).then(function() {
- self.set('actionResponse', {msg: 'Service stopped successfully. Auto refreshing in 5 seconds.', type: 'success'});
- Ember.run.later(self, function() {
+ adapter.stopService(this.get('service'), this.get('model.app.user')).then(function () {
+ self.set('actionResponse', { msg: 'Service stopped successfully. Auto refreshing in 5 seconds.', type: 'success' });
+ Ember.run.later(self, function () {
this.set('actionResponse', null);
this.send("refresh");
}, 5000);
- }, function(errr) {
+ }, function (errr) {
let messg = errr.diagnostics || 'Error: Stop service failed!';
- self.set('actionResponse', {msg: messg, type: 'error'});
- }).finally(function() {
+ self.set('actionResponse', { msg: messg, type: 'error' });
+ }).finally(function () {
self.set('isLoading', false);
});
},
@@ -59,16 +59,16 @@ export default Ember.Controller.extend({
Ember.$("#deleteServiceConfirmDialog").modal('hide');
var adapter = this.store.adapterFor('yarn-servicedef');
self.set('isLoading', true);
- adapter.deleteService(this.get('service'), this.get('model.app.user')).then(function() {
- self.set('actionResponse', {msg: 'Service deleted successfully. Redirecting to services in 5 seconds.', type: 'success'});
- Ember.run.later(self, function() {
+ adapter.deleteService(this.get('service'), this.get('model.app.user')).then(function () {
+ self.set('actionResponse', { msg: 'Service deleted successfully. Redirecting to services in 5 seconds.', type: 'success' });
+ Ember.run.later(self, function () {
this.set('actionResponse', null);
this.transitionToRoute("yarn-services");
}, 5000);
- }, function(errr) {
+ }, function (errr) {
let messg = errr.diagnostics || 'Error: Delete service failed!';
- self.set('actionResponse', {msg: messg, type: 'error'});
- }).finally(function() {
+ self.set('actionResponse', { msg: messg, type: 'error' });
+ }).finally(function () {
self.set('isLoading', false);
});
},
@@ -78,15 +78,32 @@ export default Ember.Controller.extend({
}
},
- isRunningService: Ember.computed('model.serviceName', 'model.app.state', function() {
+ isRunningService: Ember.computed('model.serviceName', 'model.app.state', function () {
return this.get('service') !== undefined && this.get('model.app.state') === 'RUNNING';
}),
- amHostHttpAddressFormatted: Ember.computed('model.app.amHostHttpAddress', function() {
+ amHostHttpAddressFormatted: Ember.computed('model.app.amHostHttpAddress', function () {
var amHostAddress = this.get('model.app.amHostHttpAddress');
if (amHostAddress && amHostAddress.indexOf('://') < 0) {
amHostAddress = 'http://' + amHostAddress;
}
return amHostAddress;
+ }),
+
+ totalOutstandingResourceRequests: Ember.computed('model.app.resourceRequests', function() {
+ const resourceRequests = this.get('model.app.resourceRequests');
+ if (resourceRequests) {
+ const totatResourceRequests = { memory: 0, vCores: 0 };
+ [].forEach.call(resourceRequests, resource => {
+ if (resource.resourceName === '*') {
+ const totalMemory = resource.capability.resourceInformations.resourceInformation[0].value * resource.numContainers;
+ const totalVCores = resource.capability.resourceInformations.resourceInformation[1].value * resource.numContainers;
+ totatResourceRequests.memory += totalMemory;
+ totatResourceRequests.vCores += totalVCores;
+ }
+ });
+ return totatResourceRequests;
+ }
+ return null;
})
});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4816d10d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
index aac93c0..cb28f82 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
@@ -75,8 +75,9 @@
<div class="links">
{{#if (or isRunningService isKillable)}}
<div class="btn-group">
- <button type="button" class="btn btn-unstyled dropdown-toggle" title="Settings" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="glyphicon glyphicon-cog" />
+ <button type="button" class="btn btn-unstyled dropdown-toggle" title="Settings"
+ data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="margin-left: -5px;">
+ <i class="glyphicon glyphicon-cog"/> Settings
</button>
<ul class="dropdown-menu dropdown-menu-right">
{{#if isRunningService}}
@@ -113,9 +114,11 @@
{{/if}}
</div>
<div>
- <span title="Queue" class="yarn-tooltip"><i class="glyphicon glyphicon-tasks glyphicon-gray" />{{model.app.queue}}</span>
+ <span title="Queue" class="yarn-tooltip">
+ <i class="glyphicon glyphicon-tasks glyphicon-gray" /> {{model.app.queue}}
+ </span>
</div>
- <div>Priority {{model.app.priority}}</div>
+ <div>Priority: {{model.app.priority}}</div>
{{#if model.app.trackingUrl}}
<div><a href="{{model.app.trackingUrl}}" target="_blank">{{model.app.trackingUI}}</a></div>
{{/if}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4816d10d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/info.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/info.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/info.hbs
index beae7d3..b11e125 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/info.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/info.hbs
@@ -58,12 +58,20 @@
{{#unless model.serviceName}}
<div class="col-md-12">
<div class="panel panel-default">
- <div class="panel-heading">Outstanding Resource Requests</div>
+ <div class="panel-heading">
+ Outstanding Resource Requests
+ {{#if totalOutstandingResourceRequests}}
+ <span class="pull-right">
+ Total: <Memory: {{totalOutstandingResourceRequests.memory}},
+ vCores: {{totalOutstandingResourceRequests.vCores}}>
+ </span>
+ {{/if}}
+ </div>
<table class="display table table-striped table-bordered"
cellspacing="0" width="100%">
<thead>
<tr>
- <th>Scheduler Key</th>
+ <th>Priority</th>
<th>Resource Name</th>
<th>Capability</th>
<th># Containers</th>
@@ -76,7 +84,8 @@
<tr>
<td>{{request.priority}}</td>
<td>{{request.resourceName}}</td>
- <td><Memory:{{request.capability.memory}};vCores:{{request.capability.virtualCores}}></td>
+ <td><Memory: {{request.capability.resourceInformations.resourceInformation.[0].value}},
+ vCores: {{request.capability.resourceInformations.resourceInformation.[1].value}}></td>
<td>{{request.numContainers}}</td>
<td>{{request.relaxLocality}}</td>
<td>
@@ -88,7 +97,9 @@
</td>
</tr>
{{else}}
- <div class="panel-body">No data available!</div>
+ <tr>
+ <td class="text-center" colspan="6">No data available!</td>
+ </tr>
{{/each}}
</tbody>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org