diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/provider/ProviderUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/provider/ProviderUtils.java index 1ad5fd8c256..ac909925f0f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/provider/ProviderUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/provider/ProviderUtils.java @@ -298,8 +298,7 @@ public class ProviderUtils implements YarnServiceConstants { destFile = new Path(staticFile.getDestFile()); } - String symlink = APP_RESOURCES_DIR + "/" + destFile.getName(); - addLocalResource(launcher, symlink, localResource, destFile); + addLocalResource(launcher, destFile.getName(), localResource, destFile); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/provider/TestProviderUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/provider/TestProviderUtils.java index 6e8bc433548..5d794d251c2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/provider/TestProviderUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/test/java/org/apache/hadoop/yarn/service/provider/TestProviderUtils.java @@ -154,11 +154,11 @@ public class TestProviderUtils { ProviderUtils.handleStaticFilesForLocalization(launcher, sfs, compLaunchCtx); - Mockito.verify(launcher).addLocalResource(Mockito.eq("resources/destFile1"), + Mockito.verify(launcher).addLocalResource(Mockito.eq("destFile1"), any(LocalResource.class)); Mockito.verify(launcher).addLocalResource( - Mockito.eq("resources/destFile_2"), any(LocalResource.class)); + Mockito.eq("destFile_2"), any(LocalResource.class)); Mockito.verify(launcher).addLocalResource( - Mockito.eq("resources/sourceFile4"), any(LocalResource.class)); + Mockito.eq("sourceFile4"), any(LocalResource.class)); } }