[
https://issues.apache.org/jira/browse/YARN-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511003#comment-15511003
]
Wangda Tan commented on YARN-3142:
----------------------------------
Thanks [~varun_saxena],
Yes I understand that this will not have any meaningful performance gain, but
we can optimize it later like adding fine-grained locks. This is first step to
us.
Generally the patch looks very good, only a few comments:
*Lock is not requred:*
{code}
public Map<String, ResourceRequest> getResourceRequests(
SchedulerRequestKey schedulerKey) {
// ...
}
{code}
*Lock is required:*
{code}
public Resource getResource(SchedulerRequestKey schedulerKey) {
// ...
}
{code}
(Imaging someone replace the request in another thread before returning)
{code}
transferStateFromPreviousAppSchedulingInfo
{code}
You may need to synchronize placesBlacklistedByApp and call
placesBlacklistedByApp.addAll(appInfo.getBlackList()) to make it consistent to
other blacklist-related operations.
> Improve locks in AppSchedulingInfo
> ----------------------------------
>
> Key: YARN-3142
> URL: https://issues.apache.org/jira/browse/YARN-3142
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: resourcemanager, scheduler
> Reporter: Wangda Tan
> Assignee: Varun Saxena
> Attachments: YARN-3142.01.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]