Revert "YARN-5533. JMX AM Used metrics for queue wrong when app submited to nodelabel partition (Bibin A Chundatt via Varun Saxena)"
This reverts commit 59557e85a4
.
This commit is contained in:
parent
59557e85a4
commit
8aed374182
|
@ -774,8 +774,7 @@ public class LeafQueue extends AbstractCSQueue {
|
|||
application.getAMResource(partitionName));
|
||||
user.getResourceUsage().decAMUsed(partitionName,
|
||||
application.getAMResource(partitionName));
|
||||
metrics.decAMUsed(application.getUser(),
|
||||
application.getAMResource(partitionName));
|
||||
metrics.decAMUsed(application.getUser(), application.getAMResource());
|
||||
}
|
||||
applicationAttemptMap.remove(application.getApplicationAttemptId());
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
|
|||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.NullRMNodeLabelsManager;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerState;
|
||||
|
@ -1960,14 +1959,6 @@ public class TestNodeLabelContainerAllocation {
|
|||
LeafQueue leafQueue = (LeafQueue) cs.getQueue("a");
|
||||
assertEquals(0 * GB, leafQueue.getMetrics().getAvailableMB());
|
||||
assertEquals(5 * GB, leafQueue.getMetrics().getAllocatedMB());
|
||||
|
||||
// Kill all apps in queue a
|
||||
cs.killAllAppsInQueue("a");
|
||||
rm1.waitForState(app1.getApplicationId(), RMAppState.KILLED);
|
||||
rm1.waitForAppRemovedFromScheduler(app1.getApplicationId());
|
||||
|
||||
assertEquals(0 * GB, leafQueue.getMetrics().getUsedAMResourceMB());
|
||||
assertEquals(0 * GB, leafQueue.getMetrics().getUsedAMResourceVCores());
|
||||
rm1.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue