Github user chtyim commented on a diff in the pull request:
https://github.com/apache/incubator-twill/pull/66#discussion_r44348039
--- Diff:
twill-yarn/src/main/java/org/apache/twill/yarn/YarnTwillRunnerService.java ---
@@ -175,6 +189,27 @@ protected void shutDown() throws Exception {
};
}
+ private File createTwillJar() throws IOException {
+ ApplicationBundler applicationBundler = new ApplicationBundler(new
ClassAcceptor());
+ List<Class<?>> classes = Lists.newArrayList();
+ classes.add(ApplicationMasterMain.class);
+ classes.add(TwillContainerMain.class);
+ // Stuck in the yarnAppClient class to make bundler being able to
pickup the right yarn-client version
+ classes.add(yarnAppClient.getClass());
+ String parentDir = yarnConfig.get(Constants.TWILL_JAR_LOCATION,
Constants.DEFAULT_TWILL_JAR_LOCATION);
+ File twillJarFile = new File(parentDir + Constants.Files.TWILL_JAR);
+
+ Set<URL> twillClassPathURLs =
applicationBundler.createBundleAndGetClassPathUrls(twillJarFile,
+
classes, ImmutableList.<URI>of());
+ List<URL> normalizeTwillURLs = new ArrayList<>();
+ for (URL url : twillClassPathURLs) {
+ normalizeTwillURLs.add(new File(url.getPath()).toURI().toURL());
+ }
+
+ twillClassLoader = new URLClassLoader(normalizeTwillURLs.toArray(new
URL[normalizeTwillURLs.size()]), null);
--- End diff --
Oh, seems like it will get reused. That's ok then.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---