YARN-4416. Deadlock due to synchronised get Methods in AbstractCSQueue. (Naganarasimha G R via wangda)
(cherry picked from commit9b856d9787
) (cherry picked from commit5060fd1840
)
This commit is contained in:
parent
c4b1386b4e
commit
b74391ce14
|
@ -1083,6 +1083,9 @@ Release 2.8.0 - UNRELEASED
|
|||
YARN-4225. Add preemption status to yarn queue -status for capacity scheduler.
|
||||
(Eric Payne via wangda)
|
||||
|
||||
YARN-4416. Deadlock due to synchronised get Methods in AbstractCSQueue.
|
||||
(Naganarasimha G R via wangda)
|
||||
|
||||
Release 2.7.3 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -46,7 +46,6 @@ import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsMana
|
|||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceLimits;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceUsage;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedContainerChangeRequest;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerUtils;
|
||||
import org.apache.hadoop.yarn.util.resource.ResourceCalculator;
|
||||
import org.apache.hadoop.yarn.util.resource.Resources;
|
||||
|
@ -135,7 +134,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public synchronized float getAbsoluteUsedCapacity() {
|
||||
public float getAbsoluteUsedCapacity() {
|
||||
return queueCapacities.getAbsoluteUsedCapacity();
|
||||
}
|
||||
|
||||
|
@ -154,7 +153,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
return queueUsage.getUsed();
|
||||
}
|
||||
|
||||
public synchronized int getNumContainers() {
|
||||
public int getNumContainers() {
|
||||
return numContainers;
|
||||
}
|
||||
|
||||
|
@ -203,7 +202,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public synchronized void setAbsoluteUsedCapacity(float absUsedCapacity) {
|
||||
public void setAbsoluteUsedCapacity(float absUsedCapacity) {
|
||||
queueCapacities.setAbsoluteUsedCapacity(absUsedCapacity);
|
||||
}
|
||||
|
||||
|
|
|
@ -109,9 +109,6 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
// cache last cluster resource to compute actual capacity
|
||||
private Resource lastClusterResource = Resources.none();
|
||||
|
||||
// absolute capacity as a resource (based on cluster resource)
|
||||
private Resource absoluteCapacityResource = Resources.none();
|
||||
|
||||
private final QueueResourceLimitsInfo queueResourceLimitsInfo =
|
||||
new QueueResourceLimitsInfo();
|
||||
|
||||
|
@ -144,7 +141,6 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
super.setupQueueConfigs(clusterResource);
|
||||
|
||||
this.lastClusterResource = clusterResource;
|
||||
updateAbsoluteCapacityResource(clusterResource);
|
||||
|
||||
this.cachedResourceLimitsForHeadroom = new ResourceLimits(clusterResource);
|
||||
|
||||
|
@ -345,10 +341,6 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
public synchronized int getNumActiveApplications(String user) {
|
||||
return getUser(user).getActiveApplications();
|
||||
}
|
||||
|
||||
public synchronized int getNumContainers() {
|
||||
return numContainers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized QueueState getState() {
|
||||
|
@ -1327,13 +1319,6 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
}
|
||||
}
|
||||
|
||||
private void updateAbsoluteCapacityResource(Resource clusterResource) {
|
||||
absoluteCapacityResource =
|
||||
Resources.multiplyAndNormalizeUp(resourceCalculator, labelManager
|
||||
.getResourceByLabel(RMNodeLabelsManager.NO_LABEL, clusterResource),
|
||||
queueCapacities.getAbsoluteCapacity(), minimumAllocation);
|
||||
}
|
||||
|
||||
private void updateCurrentResourceLimits(
|
||||
ResourceLimits currentResourceLimits, Resource clusterResource) {
|
||||
// TODO: need consider non-empty node labels when resource limits supports
|
||||
|
@ -1359,7 +1344,6 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
ResourceLimits currentResourceLimits) {
|
||||
updateCurrentResourceLimits(currentResourceLimits, clusterResource);
|
||||
lastClusterResource = clusterResource;
|
||||
updateAbsoluteCapacityResource(clusterResource);
|
||||
|
||||
// Update headroom info based on new cluster resource value
|
||||
// absoluteMaxCapacity now, will be replaced with absoluteMaxAvailCapacity
|
||||
|
|
Loading…
Reference in New Issue