[ https://issues.apache.org/jira/browse/YARN-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14370396#comment-14370396 ]
Jian He commented on YARN-3356: ------------------------------- - how about doing the for loop inside the write lock ? {code} public void copyAllUsed(ResourceUsage other) { for (Entry<String, UsageByLabel> entry : other.usages.entrySet()) { setUsed(entry.getKey(), Resources.clone(entry.getValue().getUsed())); } } {code} > Capacity Scheduler FiCaSchedulerApp should use ResourceUsage to track > used-resources-by-label. > ---------------------------------------------------------------------------------------------- > > Key: YARN-3356 > URL: https://issues.apache.org/jira/browse/YARN-3356 > Project: Hadoop YARN > Issue Type: Sub-task > Components: capacityscheduler, resourcemanager > Reporter: Wangda Tan > Assignee: Wangda Tan > Attachments: YARN-3356.1.patch, YARN-3356.2.patch, YARN-3356.3.patch, > YARN-3356.4.patch > > > Simliar to YARN-3099, Capacity Scheduler's LeafQueue.User/FiCaSchedulerApp > should use ResourceRequest to track resource-usage/pending by label for > better resource tracking and preemption. > And also, when application's pending resource changed (container allocated, > app completed, moved, etc.), we need update ResourceUsage of queue > hierarchies. -- This message was sent by Atlassian JIRA (v6.3.4#6332)