From 8817b3691f553c2396e091d896a7af17b1f9bcc8 Mon Sep 17 00:00:00 2001 From: "Weiqiang (Brandon) Li" <18016907+bambrow@users.noreply.github.com> Date: Fri, 27 May 2022 11:46:16 +0800 Subject: [PATCH] YARN-11165. Use default java.policy when no group policy is set. --- .../linux/runtime/JavaSandboxLinuxContainerRuntime.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/runtime/JavaSandboxLinuxContainerRuntime.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/runtime/JavaSandboxLinuxContainerRuntime.java index 0a25d105b10..9851032e942 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/runtime/JavaSandboxLinuxContainerRuntime.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/runtime/JavaSandboxLinuxContainerRuntime.java @@ -468,7 +468,7 @@ public class JavaSandboxLinuxContainerRuntime cacheDirs.add(path.getParent().toString()); } - if (groupPolicyPaths != null) { + if (groupPolicyPaths != null && !groupPolicyPaths.isEmpty()) { for(String policyPath : groupPolicyPaths) { Files.copy(Paths.get(policyPath), policyOutStream); }