[
https://issues.apache.org/jira/browse/YARN-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144573#comment-16144573
]
ASF GitHub Bot commented on YARN-2162:
--------------------------------------
Github user templedf commented on a diff in the pull request:
https://github.com/apache/hadoop/pull/261#discussion_r135665251
--- Diff:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationConfiguration.java
---
@@ -290,26 +290,15 @@ Resource getMinResources(String queue) {
/**
* Get the maximum resource allocation for the given queue. If the max
in not
- * set, return the larger of the min and the default max.
+ * set, return the default max.
*
* @param queue the target queue's name
* @return the max allocation on this queue
*/
- @VisibleForTesting
- Resource getMaxResources(String queue) {
- Resource maxQueueResource = maxQueueResources.get(queue);
- if (maxQueueResource == null) {
- Resource minQueueResource = minQueueResources.get(queue);
- if (minQueueResource != null &&
- Resources.greaterThan(RESOURCE_CALCULATOR, Resources.unbounded(),
- minQueueResource, queueMaxResourcesDefault)) {
- return minQueueResource;
- } else {
- return queueMaxResourcesDefault;
- }
- } else {
- return maxQueueResource;
- }
+ @VisibleForTesting ConfigurableResource getMaxResources(String queue) {
+ ConfigurableResource maxQueueResource = maxQueueResources.get(queue);
+ return maxQueueResource == null ?
+ queueMaxResourcesDefault : maxQueueResource;
--- End diff --
I'm not a fan of the ternary operator unless it really makes things
clearer. I don't see the point here.
> 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,
> YARN-2162.003.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]