Skip to content

Commit a266e32

Browse files
YARN-10286. PendingContainers bugs in the scheduler outputs. Contributed by Andras Gyori
1 parent 9cfc0e5 commit a266e32

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/FairSchedulerQueueInfo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public class FairSchedulerQueueInfo {
6060
private ResourceInfo reservedResources;
6161
private ResourceInfo maxContainerAllocation;
6262

63+
private long pendingContainers;
6364
private long allocatedContainers;
6465
private long reservedContainers;
6566

@@ -108,6 +109,7 @@ public FairSchedulerQueueInfo(FSQueue queue, FairScheduler scheduler) {
108109

109110
allocatedContainers = queue.getMetrics().getAllocatedContainers();
110111
reservedContainers = queue.getMetrics().getReservedContainers();
112+
pendingContainers = queue.getMetrics().getPendingContainers();
111113

112114
if (allocConf.isReservable(queueName) &&
113115
!allocConf.getShowReservationAsQueues(queueName)) {
@@ -122,6 +124,8 @@ public long getAllocatedContainers() {
122124
return allocatedContainers;
123125
}
124126

127+
public long getPendingContainers() { return pendingContainers; }
128+
125129
public long getReservedContainers() {
126130
return reservedContainers;
127131
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/ResourceManagerRest.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ The capacity scheduler supports hierarchical queues. This one request will print
338338
| numActiveApplications | int | The number of active applications in this queue |
339339
| numPendingApplications | int | The number of pending applications in this queue |
340340
| numContainers | int | The number of containers being used |
341+
| allocatedContainers | int | The number of allocated containers in this queue |
342+
| reservedContainers | int | The number of reserved containers in this queue |
343+
| pendingContainers | int | The number of pending containers in this queue |
341344
| maxApplications | int | The maximum number of applications this queue can have |
342345
| maxApplicationsPerUser | int | The maximum number of applications per user this queue can have |
343346
| maxActiveApplications | int | The maximum number of active applications this queue can have |

0 commit comments

Comments
 (0)