[
https://issues.apache.org/jira/browse/YARN-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135553#comment-16135553
]
ASF GitHub Bot commented on YARN-2162:
--------------------------------------
Github user flyrain commented on a diff in the pull request:
https://github.com/apache/hadoop/pull/261#discussion_r134298360
--- Diff:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
---
@@ -158,26 +158,33 @@ public Resource getMinShare() {
return minShare;
}
- public void setMaxShare(Resource maxShare){
+ public void setMaxShare(ResourceConfiguration maxShare){
this.maxShare = maxShare;
}
+ @Override
+ public Resource getMaxShare() {
+ Resource maxResource =
maxShare.getResource(scheduler.getClusterResource());
+ // Set max resource to min resource if min resource is greater than max
+ // resource
+ if(Resources.greaterThan(scheduler.getResourceCalculator(),
+ scheduler.getClusterResource(), minShare, maxResource)) {
--- End diff --
Didn't see the formatting issue, but will reformat in next patch anyway to
make sure it is right.
> add ability in Fair Scheduler to optionally configure maxResources in terms
> of percentage
> -----------------------------------------------------------------------------------------
>
> Key: YARN-2162
> URL: https://issues.apache.org/jira/browse/YARN-2162
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: fairscheduler, scheduler
> Reporter: Ashwin Shankar
> Assignee: Yufei Gu
> Labels: scheduler
> Attachments: YARN-2162.001.patch, YARN-2162.002.patch
>
>
> minResources and maxResources in fair scheduler configs are expressed in
> terms of absolute numbers X mb, Y vcores.
> As a result, when we expand or shrink our hadoop cluster, we need to
> recalculate and change minResources/maxResources accordingly, which is pretty
> inconvenient.
> We can circumvent this problem if we can optionally configure these
> properties in terms of percentage of cluster capacity.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]