YARN-4416. Deadlock due to synchronised get Methods in AbstractCSQueue. (Naganarasimha G R via wangda)
This commit is contained in:
parent
7faa406f27
commit
9b856d9787
@ -1148,6 +1148,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.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 float getAbsoluteMaximumCapacity() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized float getAbsoluteUsedCapacity() {
|
||||
public float getAbsoluteUsedCapacity() {
|
||||
return queueCapacities.getAbsoluteUsedCapacity();
|
||||
}
|
||||
|
||||
@ -154,7 +153,7 @@ public Resource getUsedResources() {
|
||||
return queueUsage.getUsed();
|
||||
}
|
||||
|
||||
public synchronized int getNumContainers() {
|
||||
public int getNumContainers() {
|
||||
return numContainers;
|
||||
}
|
||||
|
||||
@ -203,7 +202,7 @@ public void setUsedCapacity(float usedCapacity) {
|
||||
}
|
||||
|
||||
@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 @@ protected synchronized void setupQueueConfigs(Resource clusterResource)
|
||||
super.setupQueueConfigs(clusterResource);
|
||||
|
||||
this.lastClusterResource = clusterResource;
|
||||
updateAbsoluteCapacityResource(clusterResource);
|
||||
|
||||
this.cachedResourceLimitsForHeadroom = new ResourceLimits(clusterResource);
|
||||
|
||||
@ -346,10 +342,6 @@ public synchronized int getNumPendingApplications(String user) {
|
||||
public synchronized int getNumActiveApplications(String user) {
|
||||
return getUser(user).getActiveApplications();
|
||||
}
|
||||
|
||||
public synchronized int getNumContainers() {
|
||||
return numContainers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized QueueState getState() {
|
||||
@ -1328,13 +1320,6 @@ synchronized void releaseResource(Resource clusterResource,
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@ -1360,7 +1345,6 @@ public synchronized void updateClusterResource(Resource clusterResource,
|
||||
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
Block a user