From 227d64ab59e8aa6477769b2542ad0cd7a6d855cb Mon Sep 17 00:00:00 2001 From: Owen O'Malley Date: Mon, 23 May 2022 22:07:19 -0700 Subject: [PATCH] YARN-11162. Set the zk acl for nodes created by ZKConfigurationStore. (#4350) (cherry picked from commit f390edaec44cfa91b2b09549091f033f1749d8ac) Conflicts: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java (cherry picked from commit 88a8752fa2ba0c70b0df94a78eb9fd86b965acd5) --- .../scheduler/capacity/conf/ZKConfigurationStore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java index 09d9e2b9f28..15c5b700879 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java @@ -97,13 +97,13 @@ public class ZKConfigurationStore extends YarnConfigurationStore { zkManager.delete(fencingNodePath); if (!zkManager.exists(logsPath)) { - zkManager.create(logsPath); + zkManager.create(logsPath, zkAcl); zkManager.setData(logsPath, serializeObject(new LinkedList()), -1); } if (!zkManager.exists(confStorePath)) { - zkManager.create(confStorePath); + zkManager.create(confStorePath, zkAcl); HashMap mapSchedConf = new HashMap<>(); for (Map.Entry entry : schedConf) { mapSchedConf.put(entry.getKey(), entry.getValue());