hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11656) Classpath isolation for downstream clients
Date Mon, 18 May 2015 21:56:05 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14549310#comment-14549310

Sangjin Lee commented on HADOOP-11656:

Thanks for the response [~busbey]. A couple of follow-up comments...

We get around this issue when using OSGi containers by exporting a different set of dependencies
depending on what the client application tells us it needs. By default in branch-2 we presume
not telling us means they need whatever hte last release on branch-2 was. By default in trunk
/ branch-3 we presume it means "export nothing."
When a client application says "I need Hadoop 2.2 dependencies" we can export a set of dependencies
that matches that release. See the paragraph that starts with "To maintain backwards compatibility..."

Yes, I understand that we would try to maintain a backward compatible behavior in branch-2.
That's what I assumed as well. My point was really about the trunk (3.x). By exporting nothing,
hadoop would become stricter. While it would ultimately lead to better hygiene in terms of
dependencies, my point was that the initial (practical) cost of users cleaning up their apps
and builds to make sure they bring their dependencies is not going to be trivial and we should
be prepared for that if we make that transition.

For example, all user apps should be checked to ensure they include all necessary runtime
dependencies. In case of maven, it would be a combination of using the dependency plugin and
the enforcer plugin to make that happen. Also, there are other build systems to consider (gradle,
pants, etc.).

I'll look at HADOOP-11804 too (I take you're still working on it).

> Classpath isolation for downstream clients
> ------------------------------------------
>                 Key: HADOOP-11656
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11656
>             Project: Hadoop Common
>          Issue Type: New Feature
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>              Labels: classloading, classpath, dependencies, scripts, shell
>         Attachments: HADOOP-11656_proposal.md
> Currently, Hadoop exposes downstream clients to a variety of third party libraries. As
our code base grows and matures we increase the set of libraries we rely on. At the same time,
as our user base grows we increase the likelihood that some downstream project will run into
a conflict while attempting to use a different version of some library we depend on. This
has already happened with i.e. Guava several times for HBase, Accumulo, and Spark (and I'm
sure others).
> While YARN-286 and MAPREDUCE-1700 provided an initial effort, they default to off and
they don't do anything to help dependency conflicts on the driver side or for folks talking
to HDFS directly. This should serve as an umbrella for changes needed to do things thoroughly
on the next major version.
> We should ensure that downstream clients
> 1) can depend on a client artifact for each of HDFS, YARN, and MapReduce that doesn't
pull in any third party dependencies
> 2) only see our public API classes (or as close to this as feasible) when executing user
provided code, whether client side in a launcher/driver or on the cluster in a container or
within MR.
> This provides us with a double benefit: users get less grief when they want to run substantially
ahead or behind the versions we need and the project is freer to change our own dependency
versions because they'll no longer be in our compatibility promises.
> Project specific task jiras to follow after I get some justifying use cases written in
the comments.

This message was sent by Atlassian JIRA

View raw message