From d5bc9582793de6ab2d2e489cde293bf076229a1c Mon Sep 17 00:00:00 2001 From: Yufei Gu Date: Mon, 28 Aug 2017 10:09:46 -0700 Subject: [PATCH] YARN-7099. ResourceHandlerModule.parseConfiguredCGroupPath only works for privileged yarn users. (Contributed by Miklos Szegedi via Yufei Gu) --- .../linux/resources/ResourceHandlerModule.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/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 b/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 index a81a77b651b..3c61cd4b5be 100644 --- a/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 +++ b/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()); } } }