[
https://issues.apache.org/jira/browse/TWILL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865270#comment-15865270
]
Terence Yim commented on TWILL-217:
-----------------------------------
Pretty much it, but we do need to follow the Java classloading hierarchy.
Ideally twill application only need to depends on classes from the
{{twill-api}} module (and transitive dependencies that brought through it,
which is very minimal). Meaning the classloader hierarchy would look something
like this:
{noformat}
Java Bootstrap CL
|
Java Ext CL
|
Base Classloader
(only has twill-api jars and its dependencies)
|
-----------------------------------
| |
Twill ClassLoader App ClassLaoder
(twill-core, twill-yarn…) (application.jar)
{noformat}
With this isolation, twill is free to use library of its choice (as long as
it's not "leaking" through twill-api) and the application can also use any
library of its choice. The launcher is responsible in creating such hierarchy.
> AppMaster launcher should include eventHandler dependencies and nothing else
> from application
> ---------------------------------------------------------------------------------------------
>
> Key: TWILL-217
> URL: https://issues.apache.org/jira/browse/TWILL-217
> Project: Apache Twill
> Issue Type: Improvement
> Components: yarn
> Affects Versions: 0.9.0
> Reporter: Martin Serrano
>
> Currently the launcher for the appmaster includes the application.jar
> libraries. This is to support user code that adds an EventHandler. The
> application may have many dependencies and including them in the appmaster
> classpath can lead to otherwise inaddressable incompatibilities.
> In my case, something in my application's large dependency graph was
> interfering with the Kafka server operation. I was not able to determine
> what it was but tweaking the appmaster loader to not include my application
> jars fixed the issue.
> Instead the bundler that creates the twill.jar should include the
> EventHandler extension (if any) as an explicit dependency. In this way, only
> the jars needed to support the event handler will be on the twill classpath.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)