YARN-4624. NPE in PartitionQueueCapacitiesInfo while accessing Schduler UI. Contributed by Brahma Reddy Battula
This commit is contained in:
parent
e605d47df0
commit
d81b8163b4
|
@ -35,14 +35,14 @@ public class PartitionQueueCapacitiesInfo {
|
|||
private float absoluteCapacity;
|
||||
private float absoluteUsedCapacity;
|
||||
private float absoluteMaxCapacity = 100;
|
||||
private Float maxAMLimitPercentage;
|
||||
private float maxAMLimitPercentage;
|
||||
|
||||
public PartitionQueueCapacitiesInfo() {
|
||||
}
|
||||
|
||||
public PartitionQueueCapacitiesInfo(String partitionName, float capacity,
|
||||
float usedCapacity, float maxCapacity, float absCapacity,
|
||||
float absUsedCapacity, float absMaxCapacity, Float maxAMLimitPercentage) {
|
||||
float absUsedCapacity, float absMaxCapacity, float maxAMLimitPercentage) {
|
||||
super();
|
||||
this.partitionName = partitionName;
|
||||
this.capacity = capacity;
|
||||
|
|
|
@ -49,7 +49,7 @@ public class QueueCapacitiesInfo {
|
|||
float absCapacity;
|
||||
float absUsedCapacity;
|
||||
float absMaxCapacity;
|
||||
Float maxAMLimitPercentage;
|
||||
float maxAMLimitPercentage;
|
||||
for (String partitionName : capacities.getExistingNodeLabels()) {
|
||||
usedCapacity = capacities.getUsedCapacity(partitionName) * 100;
|
||||
capacity = capacities.getCapacity(partitionName) * 100;
|
||||
|
@ -68,7 +68,7 @@ public class QueueCapacitiesInfo {
|
|||
queueCapacitiesByPartition.add(new PartitionQueueCapacitiesInfo(
|
||||
partitionName, capacity, usedCapacity, maxCapacity, absCapacity,
|
||||
absUsedCapacity, absMaxCapacity,
|
||||
considerAMUsage ? maxAMLimitPercentage : null));
|
||||
considerAMUsage ? maxAMLimitPercentage : 0f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue