From c4c57b80e1e43391417e958f455e25fd7ff67d07 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Wed, 15 Nov 2017 12:01:29 +0530 Subject: [PATCH] YARN-7462. Render outstanding resource requests on application page of new YARN UI. Contributed by Vasudevan Skm. --- .gitignore | 4 +- .../src/main/webapp/app/models/yarn-app.js | 1 + .../main/webapp/app/serializers/yarn-app.js | 1 + .../webapp/app/templates/yarn-app/info.hbs | 42 +++++++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 817556f92d..70c1f23116 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,4 @@ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp yarnregistry.pdf patchprocess/ - - -.history/ \ No newline at end of file +.history/ diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js index 47814e48c2..853e2ee144 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js @@ -52,6 +52,7 @@ export default DS.Model.extend({ currentAppAttemptId: DS.attr('string'), remainingTimeoutInSeconds: DS.attr('number'), applicationExpiryTime: DS.attr('string'), + resourceRequests: DS.attr('array'), isFailed: function() { return this.get('finalStatus') === "FAILED"; 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 1462f5aa08..efdb1ba638 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 @@ -58,6 +58,7 @@ export default DS.JSONAPISerializer.extend({ allocatedMB: payload.allocatedMB, allocatedVCores: payload.allocatedVCores, runningContainers: payload.runningContainers, + resourceRequests: payload.resourceRequests, memorySeconds: payload.memorySeconds, vcoreSeconds: payload.vcoreSeconds, preemptedResourceMB: payload.preemptedResourceMB, 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 534869e2ec..6b06961908 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 @@ -132,6 +132,48 @@ {{/if}} +{{#unless model.serviceName}} +
+
+
+
Outstanding Resource Requests
+ + + + + + + + + + + + + {{#each model.app.resourceRequests as |request|}} + + + + + + + + + {{else}} +
No data available!
+ {{/each}} + +
Scheduler KeyResource NameCapability# ContainersRelax LocalityNode Label Expression
{{request.priority}}{{request.resourceName}}<Memory:{{request.capability.memory}};vCores:{{request.capability.virtualCores}}>{{request.numContainers}}{{request.relaxLocality}} + {{#if request.nodeLabelExpression}} + {{request.nodeLabelExpression}} + {{else}} + N/A + {{/if}} +
+
+
+
+{{/unless}}