浏览代码

YARN-7099. ResourceHandlerModule.parseConfiguredCGroupPath only works for privileged yarn users. (Contributed by Miklos Szegedi via Yufei Gu)

Yufei Gu 7 年之前
父节点
当前提交
d5bc958279

+ 3 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/ResourceHandlerModule.java

@@ -268,11 +268,11 @@ public class ResourceHandlerModule {
       // Collect the valid subsystem names
       cgroupList.retainAll(validCGroups);
       if (!cgroupList.isEmpty()) {
-        if (candidate.isDirectory() && candidate.canWrite()) {
+        if (candidate.isDirectory()) {
           pathSubsystemMappings.put(candidate.getAbsolutePath(), cgroupList);
         } else {
-          LOG.warn("The following cgroup is not a directory or it is not"
-              + " writable" + candidate.getAbsolutePath());
+          LOG.warn("The following cgroup is not a directory " +
+              candidate.getAbsolutePath());
         }
       }
     }