[ https://issues.apache.org/jira/browse/YARN-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137142#comment-16137142 ]
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_r134562312 --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFSParentQueue.java --- @@ -42,6 +43,8 @@ public void setUp() throws Exception { AllocationConfiguration allocConf = new AllocationConfiguration(conf); when(scheduler.getAllocationConfiguration()).thenReturn(allocConf); when(scheduler.getConf()).thenReturn(conf); + when(scheduler.getResourceCalculator()).thenReturn( --- End diff -- It throws an exception like this if we don't do this: ``` java.lang.NullPointerException at org.apache.hadoop.yarn.util.resource.Resources.greaterThan(Resources.java:310) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue.getMaxShare(FSQueue.java:171) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration.initFSQueue(AllocationConfiguration.java:409) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue.reinit(FSQueue.java:111) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue.<init>(FSQueue.java:96) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSParentQueue.<init>(FSParentQueue.java:60) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueueManager.initialize(QueueManager.java:77) at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSParentQueue.setUp(TestFSParentQueue.java:58) ``` This code path doesn't exist before my patch. > 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: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org