[
https://issues.apache.org/jira/browse/YARN-9439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815014#comment-16815014
]
Tao Yang commented on YARN-9439:
--------------------------------
Thanks [~cheersyang] for the review.
{quote}
In ActivityManager, the changes you've done for
{{startAppAllocationRecording}}, this seems to have changed the behavior, is it
on purpose?
{quote}
Updates in ActivityManager#startAppAllocationRecording won't change the
behavior, only adjust the logic from "if(A&B)\{...\} if(A&!B)\{...\}" to
"if(A)\{if(B)\{...\}else\{...\}\}", the purpose is to enhance the efficiency
through reducing unnecessary check.
Reviewing this logic, I think there is still a race condition risk to call
Map#get after Map#containsKey. I will update this logic as follows:
{code:java}
Long turnOffTimestamp =
recordingAppActivitiesUntilSpecifiedTime.get(applicationId);
if (turnOffTimestamp != null) {
if (turnOffTimestamp > currTS) {
appsAllocation.get().put(applicationId,
new AppAllocation(application.getPriority(), nodeID,
application.getQueueName()));
} else {
turnOffActivityMonitoringForApp(applicationId);
}
}
{code}
> Support asynchronized scheduling mode and multi-node lookup mechanism for app
> activities
> ----------------------------------------------------------------------------------------
>
> Key: YARN-9439
> URL: https://issues.apache.org/jira/browse/YARN-9439
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: capacityscheduler
> Reporter: Tao Yang
> Assignee: Tao Yang
> Priority: Major
> Attachments: YARN-9439.001.patch, YARN-9439.002.patch,
> YARN-9439.003.patch
>
>
> [Design
> doc|https://docs.google.com/document/d/1pwf-n3BCLW76bGrmNPM4T6pQ3vC4dVMcN2Ud1hq1t2M/edit#heading=h.m051gyiikx7c]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]