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 34b82e6da0)
This commit is contained in:
Wangda Tan 2019-09-06 19:18:13 -07:00
parent 36c1caced5
commit 0ee7d09138
1 changed files with 1 additions and 2 deletions

View File

@ -1178,8 +1178,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");