Browse Source

YARN-7285. ContainerExecutor always launches with priorities due to yarn-default property. Contributed by Jason Lowe.

Naganarasimha 7 years ago
parent
commit
d0046bb5c6

+ 2 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml

@@ -1869,10 +1869,10 @@
   <property>
   <property>
     <description>
     <description>
     Adjustment to the container OS scheduling priority.  In Linux, passed
     Adjustment to the container OS scheduling priority.  In Linux, passed
-    directly to the nice command.
+    directly to the nice command. If unspecified then containers are launched
+    without any explicit OS priority.
     </description>
     </description>
     <name>yarn.nodemanager.container-executor.os.sched.priority.adjustment</name>
     <name>yarn.nodemanager.container-executor.os.sched.priority.adjustment</name>
-    <value>0</value>
   </property>
   </property>
 
 
   <property>
   <property>

+ 0 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutorWithMocks.java

@@ -247,9 +247,6 @@ public class TestLinuxContainerExecutorWithMocks {
     // make sure the command doesn't contain the nice -n since priority
     // make sure the command doesn't contain the nice -n since priority
     // not specified
     // not specified
     List<String> command = new ArrayList<String>();
     List<String> command = new ArrayList<String>();
-    Configuration conf = mockExec.getConf();
-    conf.unset(YarnConfiguration.NM_CONTAINER_EXECUTOR_SCHED_PRIORITY);
-    mockExec.setConf(conf);
     mockExec.addSchedPriorityCommand(command);
     mockExec.addSchedPriorityCommand(command);
     assertEquals("addSchedPriority should be empty", 0, command.size());
     assertEquals("addSchedPriority should be empty", 0, command.size());
   }
   }