From 0e77347972da9193b35b07a861b3d15d58c0ab47 Mon Sep 17 00:00:00 2001 From: Wangda Tan Date: Fri, 6 Sep 2019 19:18:13 -0700 Subject: [PATCH] YARN-9813. RM does not start on JDK11 when UIv2 is enabled. (Adam Antal/Eric Yang via wangda) Change-Id: I18b8edc930b2efa0652f59c246931ad0d46827f3 (cherry picked from commit 34b82e6da0a471010cdae613ba39487889d79369) --- .../hadoop/yarn/server/resourcemanager/ResourceManager.java | 3 +-- 1 file changed, 1 insertion(+), 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/ResourceManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java index 41edfe4038d..65b0229593b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java @@ -1202,8 +1202,7 @@ public class ResourceManager extends CompositeService if (null == onDiskPath) { String war = "hadoop-yarn-ui-" + VersionInfo.getVersion() + ".war"; - URLClassLoader cl = (URLClassLoader) ClassLoader.getSystemClassLoader(); - URL url = cl.findResource(war); + URL url = getClass().getClassLoader().getResource(war); if (null == url) { onDiskPath = getWebAppsPath("ui2");