[
https://issues.apache.org/jira/browse/YARN-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15214527#comment-15214527
]
Wangda Tan commented on YARN-4808:
----------------------------------
[~kasha],
Following changes are make sense to me:
bq. 2. Some methods end up doing very similar things, so consolidating them
bq. 3. Renaming totalResource to capacity. YARN-4511 plans to add
inflatedCapacity to include the un-utilized resources, and having two totals
can be a little confusing.
However, for 1. I'm trying to use these volatile fields in YARN-4390. YARN-4390
makes preemption decisions according to reserved containers and node status
(like reserved resource, available resource, etc.). Weak consistency is fine in
this case, because we need wait minutes to kill preemption candidates, many
changes could happen during the wait. And it is also very important to avoid
lock schedulerNode. I even try to relax several more fields of SchedulerNode to
volatile.
> SchedulerNode can use a few more cosmetic changes
> -------------------------------------------------
>
> Key: YARN-4808
> URL: https://issues.apache.org/jira/browse/YARN-4808
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: scheduler
> Affects Versions: 2.8.0
> Reporter: Karthik Kambatla
> Assignee: Karthik Kambatla
> Attachments: yarn-4808-1.patch, yarn-4808-2.patch
>
>
> We have made some cosmetic changes to SchedulerNode recently. While working
> on YARN-4511, realized we could improve it a little more:
> # Remove volatile variables - don't see the need for them being volatile
> # Some methods end up doing very similar things, so consolidating them
> # Renaming totalResource to capacity. YARN-4511 plans to add inflatedCapacity
> to include the un-utilized resources, and having two totals can be a little
> confusing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)