[
https://issues.apache.org/jira/browse/YARN-8590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634800#comment-16634800
]
Zoltan Siegl commented on YARN-8590:
------------------------------------
As for the tests you could extract some copy-paste functionality by creating
something like:
{code:java}
private List<Container> createAppAttemptAndGetAllocatedContainers(
RMNode node, int memory, int totalMemory, String queueName,
String userName, ExecutionType expectedExecutionType, int
expectedContainerSize) {
ApplicationAttemptId appAttempt =
createSchedulingRequest(memory, queueName, userName, 1, false);
scheduler.handle(new NodeUpdateSchedulerEvent(node));
assertEquals(totalMemory, scheduler.getQueueManager().getQueue(queueName).
getGuaranteedResourceUsage().getMemorySize());
List<Container> allocatedContainers =
scheduler.getSchedulerApp(appAttempt).pullNewlyAllocatedContainers();
assertTrue(allocatedContainers.size() == expectedContainerSize);
assertEquals("unexpected container execution type",
expectedExecutionType,
allocatedContainers.get(0).getExecutionType());
return allocatedContainers;
}
{code}
Otherwise LGTM +1 (Non binding)
> Fair scheduler promotion does not update container execution type and token
> ---------------------------------------------------------------------------
>
> Key: YARN-8590
> URL: https://issues.apache.org/jira/browse/YARN-8590
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: fairscheduler
> Affects Versions: YARN-1011
> Reporter: Haibo Chen
> Assignee: Haibo Chen
> Priority: Major
> Attachments: YARN-8590-YARN-1011.00.patch,
> YARN-8590-YARN-1011.01.patch, YARN-8590-YARN-1011.02.patch
>
>
> Fair Scheduler promotion of opportunistic containers does not update
> container execution type and token. This leads to incorrect resource
> accounting when the promoted containers are released.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]