[
https://issues.apache.org/jira/browse/YARN-6172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884286#comment-15884286
]
Karthik Kambatla commented on YARN-6172:
----------------------------------------
Good catch, Miklos.
Comments on the patch:
# Nit: Rename tempDemand to tmpDemand to match rest of Yarn code?
# Instead of passing tmpDemand to helper method, how about changing the helper
method (named {{updateAndGetDemandForApp}}) to just call
{{sched.updateDemand()}} and return the new value. The addition can be done in
the caller. I guess, at that point, there is little use for the helper method.
I am okay with dropping that debug log. Basically, simplify it to be:
{code}
for (FSAppAttempt sched : runnableApps) {
sched.updateDemand();
Resources.addTo(tmpDemand, sched.getDemand());
}
for (FSAppAttempt sched : nonRunnableApps) {
sched.updateDemand();
Resources.addTo(tmpDemand, sched.getDemand());
}
{code}
# In the tests, the asserts are moot, since we loop forever. The asserts are
never triggered in failure scenarios. Can we change the loops to be either
#iterations-based or time-based.
# Also, the below condition in the tests shouldn't include equality
{code}
while(preemptionThread.uniqueAppsAdded() >=
preemptionThread.totalAppsAdded()) {
{code}
> TestFSAppStarvation fails on trunk
> ----------------------------------
>
> Key: YARN-6172
> URL: https://issues.apache.org/jira/browse/YARN-6172
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Reporter: Varun Saxena
> Assignee: Miklos Szegedi
> Attachments: YARN-6172.000.patch
>
>
> Refer to test report
> https://builds.apache.org/job/PreCommit-YARN-Build/14882/testReport/
> {noformat}
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSAppStarvation.verifyLeafQueueStarvation(TestFSAppStarvation.java:133)
> at
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSAppStarvation.testPreemptionEnabled(TestFSAppStarvation.java:106)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]