YARN-8339. Service AM should localize static/archive resource types to container working directory instead of 'resources'. (Suma Shivaprasad via wangda)

Change-Id: I9f8e8f621650347f6c2f9e3420edee9eb2f356a4
This commit is contained in:
Wangda Tan 2018-05-29 09:23:11 -07:00
parent 3c75f8e493
commit 3061bfcde5
2 changed files with 4 additions and 5 deletions

View File

@ -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);
}
}

View File

@ -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));
}
}