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

This commit is contained in:
Yufei Gu 2017-08-28 10:09:46 -07:00
parent 02599bda04
commit d5bc958279
1 changed files with 3 additions and 3 deletions

View File

@ -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());
}
}
}