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 absoluteCapacity;
|
||||||
private float absoluteUsedCapacity;
|
private float absoluteUsedCapacity;
|
||||||
private float absoluteMaxCapacity = 100;
|
private float absoluteMaxCapacity = 100;
|
||||||
private Float maxAMLimitPercentage;
|
private float maxAMLimitPercentage;
|
||||||
|
|
||||||
public PartitionQueueCapacitiesInfo() {
|
public PartitionQueueCapacitiesInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PartitionQueueCapacitiesInfo(String partitionName, float capacity,
|
public PartitionQueueCapacitiesInfo(String partitionName, float capacity,
|
||||||
float usedCapacity, float maxCapacity, float absCapacity,
|
float usedCapacity, float maxCapacity, float absCapacity,
|
||||||
float absUsedCapacity, float absMaxCapacity, Float maxAMLimitPercentage) {
|
float absUsedCapacity, float absMaxCapacity, float maxAMLimitPercentage) {
|
||||||
super();
|
super();
|
||||||
this.partitionName = partitionName;
|
this.partitionName = partitionName;
|
||||||
this.capacity = capacity;
|
this.capacity = capacity;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class QueueCapacitiesInfo {
|
||||||
float absCapacity;
|
float absCapacity;
|
||||||
float absUsedCapacity;
|
float absUsedCapacity;
|
||||||
float absMaxCapacity;
|
float absMaxCapacity;
|
||||||
Float maxAMLimitPercentage;
|
float maxAMLimitPercentage;
|
||||||
for (String partitionName : capacities.getExistingNodeLabels()) {
|
for (String partitionName : capacities.getExistingNodeLabels()) {
|
||||||
usedCapacity = capacities.getUsedCapacity(partitionName) * 100;
|
usedCapacity = capacities.getUsedCapacity(partitionName) * 100;
|
||||||
capacity = capacities.getCapacity(partitionName) * 100;
|
capacity = capacities.getCapacity(partitionName) * 100;
|
||||||
|
@ -68,7 +68,7 @@ public class QueueCapacitiesInfo {
|
||||||
queueCapacitiesByPartition.add(new PartitionQueueCapacitiesInfo(
|
queueCapacitiesByPartition.add(new PartitionQueueCapacitiesInfo(
|
||||||
partitionName, capacity, usedCapacity, maxCapacity, absCapacity,
|
partitionName, capacity, usedCapacity, maxCapacity, absCapacity,
|
||||||
absUsedCapacity, absMaxCapacity,
|
absUsedCapacity, absMaxCapacity,
|
||||||
considerAMUsage ? maxAMLimitPercentage : null));
|
considerAMUsage ? maxAMLimitPercentage : 0f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue