[
https://issues.apache.org/jira/browse/YARN-6673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056094#comment-16056094
]
ASF GitHub Bot commented on YARN-6673:
--------------------------------------
Github user haibchen commented on a diff in the pull request:
https://github.com/apache/hadoop/pull/232#discussion_r123036136
--- Diff:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/TestCGroupsCpuResourceHandlerImpl.java
---
@@ -294,4 +296,26 @@ public void testTeardown() throws Exception {
public void testStrictResourceUsage() throws Exception {
Assert.assertNull(cGroupsCpuResourceHandler.teardown());
}
+
+ @Test
+ public void testOpportunistic() throws Exception {
+ Configuration conf = new YarnConfiguration();
+
+ String id = "container_01_01";
+ ContainerId mockContainerId = mock(ContainerId.class);
+ when(mockContainerId.toString()).thenReturn(id);
+
+ cGroupsCpuResourceHandler.bootstrap(plugin, conf);
--- End diff --
Can we move this above cGroupsCpuResourceHandler.prestart()?
> Add cpu cgroup configurations for opportunistic containers
> ----------------------------------------------------------
>
> Key: YARN-6673
> URL: https://issues.apache.org/jira/browse/YARN-6673
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Haibo Chen
> Assignee: Miklos Szegedi
>
> In addition to setting cpu.cfs_period_us on a per-container basis, we could
> also set cpu.shares to 2 for opportunistic containers so they are run on a
> best-effort basis
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]