Wangda Tan commented on YARN-3216:

Thanks [~sunilg].

Went through the patch, some comments:

1. AbstractCSQueue: Instead of adding AM-used-resource to parentQueue, I think 
we may only need to calculate AM-used-resource on LeafQueueu and user. 
Currently we don't have limitation of AM-used-resource on parentQueue, so the 
aggregated resource may not be very useful. We can add it along the hierachy if 
we want to limit max-am-percent on parentQueue in the future.

2. CapacitySchedulerConfiguration: Instead of introduce a new configuration: 
MAXIMUM_AM_RESOURCE_PARTITION_SUFFIX, I suggest to use the existing one: 
maximum-am-resource-percent. If 
{{queue.accessible-node-labels.<label>.maximum-am-resource-percent}} not set, 
it uses queue.maximum-am-resource-percent. Please let me know if there's any 
specific reason to add a new maximum-am-resource-partition.

3. LeafQueue: I'm wondering if we need to maintain map of {{PartitionInfo}}: 
PartitionInfo.getActiveApplications is only used to check if there's any 
activated apps under a partition, it is equivalent to 
{{queueUsage.getAMUsed(partitionName) > 0}}.

4. SchedulerApplicationAttempt: I think return value getAMUsed should be:
- Before AM container allocated, it returns AM-Resource-Request.resource on 
- After AM container allocated, it returns AM-Container.resource on 
- you don't have to update am-resource when AM container just allocated, 
because AM-container.resource and am-resource-request.node-label-request won't 
be changed, but you need to update this if partition of AM-container's NM 
updated). I'm not sure if it is clear to you, please let me know if you need 
more elaborate about this comment.

I found you removed some code from FiCaSchedulerApp's constructor, I think 
getAMUsed should still return correct value before AM container allocated, 
otherwise the computation might be wrong. Let me know if I didn't understand 
your code correctly.

> Max-AM-Resource-Percentage should respect node labels
> -----------------------------------------------------
>                 Key: YARN-3216
>                 URL: https://issues.apache.org/jira/browse/YARN-3216
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Sunil G
>            Priority: Critical
>         Attachments: 0001-YARN-3216.patch, 0002-YARN-3216.patch, 
> 0003-YARN-3216.patch
> Currently, max-am-resource-percentage considers default_partition only. When 
> a queue can access multiple partitions, we should be able to compute 
> max-am-resource-percentage based on that.

This message was sent by Atlassian JIRA

Reply via email to