Thanks for update Sunil G.
As suggested in an earlier comment, I created a JIRA to track user-am-resource-limit per-partition separately.
YARN-4229. I will link the issue here.
I think most of user-am-resource-limit per partition is covered by the patch, correct? One thing lacking in the patch is, we haven't consider number of active users for each partition, I'm not sure if that is the highest priority.
So max-capacity will be helpful here, and as I see it getAMResourceLimit() is having this also considered.
I can remember what we discussed while doing
YARN-2637, I think the approach in your patch is slightly different from YARN-2637:
YARN-2637 is: amLimit = max(queue-limit, queue-configured-capacity) * max-am-percent
And queue-limit is based on queue's max capacity as well as sibling used resource, so it is possible queue-limit less than queue-configured-capacity.
In your patch:
amLimit = max(queue-max-capacity, queue-configured-capacity) * max-am-percent. Since the queue-max-capacity will be always >= queue-configured-capacity.
Before we have queue-limit computation for node partition, I think we should use queue-configured-capacity. Otherwise, a queue has max-capacity >> configured-capacity will be problematic.
Few more comments: