diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js index 84b0fabe521..9016e92559b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js @@ -22,5 +22,14 @@ export default DS.Model.extend({ name: DS.attr('string'), queueName: DS.attr('string'), usedMemoryMB: DS.attr('number'), - usedVCore: DS.attr('number') + usedVCore: DS.attr('number'), + maxMemoryMB: DS.attr('number'), + maxVCore: DS.attr('number'), + amUsedMemoryMB: DS.attr('number'), + amUsedVCore: DS.attr('number'), + maxAMMemoryMB: DS.attr('number'), + maxAMVCore: DS.attr('number'), + userWeight: DS.attr('string'), + activeApps: DS.attr('number'), + pendingApps: DS.attr('number') }); \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js index 57714e3d462..2dec5205fdd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js @@ -36,6 +36,8 @@ export default DS.JSONAPISerializer.extend({ // update user models if (payload.users && payload.users.user) { payload.users.user.forEach(function(u) { + var defaultPartitionResource = u.resources.resourceUsagesByPartition[0]; + var maxAMResource = defaultPartitionResource.amLimit; includedData.push({ type: "YarnUser", id: u.username + "_" + payload.queueName, @@ -44,6 +46,15 @@ export default DS.JSONAPISerializer.extend({ queueName: payload.queueName, usedMemoryMB: u.resourcesUsed.memory || 0, usedVCore: u.resourcesUsed.vCores || 0, + maxMemoryMB: u.userResourceLimit.memory || 0, + maxVCore: u.userResourceLimit.vCores || 0, + amUsedMemoryMB: u.AMResourceUsed.memory || 0, + amUsedVCore: u.AMResourceUsed.vCores || 0, + maxAMMemoryMB: maxAMResource.memory || 0, + maxAMVCore: maxAMResource.vCores || 0, + userWeight: u.userWeight || '', + activeApps: u.numActiveApplications || 0, + pendingApps: u.numPendingApplications || 0 } }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.scss b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.scss index 01dc9f5b71c..59e437a9f55 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.scss +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.scss @@ -754,4 +754,22 @@ div.loggedin-user { border: none; border-radius: 2px; } +} + +/** + * Active User Info table styles + */ +.active-user-panel { + margin-top: 10px; +} + +table.active-user-table { + border: 1px solid #ddd; + > thead > tr > th { + background-color: #f7f7f7; + } + &.table-bordered > thead > tr > th, + &.table-bordered > tbody > tr > td { + border: 1px solid #dcdcdc !important; + } } \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/apps.hbs index 97820c9f0e6..dc5413e048e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/apps.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/apps.hbs @@ -17,7 +17,7 @@ }}
User Name | +Max Resource | +Used Resource | +Max AM Resource | +Used AM Resource | +Active Apps | +Pending Apps | +Weight | +
---|---|---|---|---|---|---|---|
{{ user.name }} | +<memory: {{user.maxMemoryMB}} MB, vCores: {{user.maxVCore}}> | +<memory: {{user.usedMemoryMB}} MB, vCores: {{user.usedVCore}}> | +<memory: {{user.maxAMMemoryMB}} MB, vCores: {{user.maxAMVCore}}> | +<memory: {{user.amUsedMemoryMB}} MB, vCores: {{user.amUsedVCore}}> | +{{user.activeApps}} | +{{user.pendingApps}} | +{{user.userWeight}} | +