You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2017/04/24 21:20:07 UTC

[jira] [Comment Edited] (HADOOP-11656) Classpath isolation for downstream clients

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

Christopher Tubbs edited comment on HADOOP-11656 at 4/24/17 9:19 PM:
---------------------------------------------------------------------

bq. No, this isn't possible. We're talking about client side dependencies. Maven central is exactly where the vast majority of downstream users will get the artifacts they need to test that things work as expected.

During testing, yes, probably true that's what most users use. However, it *is* possible to publish both shaded and non-shaded jars to Maven Central. The {{maven-shade-plugin}} can add a "-shaded" classifier to its artifacts and attach them to the build rather than replace the non-shaded versions. Clients could quite easily choose which version (shaded or non) they wish to depend on during their own development (and runtime, if they end up using those same jars for their runtime class path).

The shaded solution might be easier for some during development... but ultimately, what is on the runtime class path is determined by how the client software is packaged and configured when it is deployed, rather than what's specified in the Hadoop POM.


was (Author: ctubbsii):
bq. No, this isn't possible. We're talking about client side dependencies. Maven central is exactly where the vast majority of downstream users will get the artifacts they need to test that things work as expected.

During testing, yes, probably true. However, it is possible to publish both shaded and non-shaded jars to Maven Central. The {{maven-shade-plugin}} can add a "-shaded" classifier to its artifacts and attach them to the build rather than replace the non-shaded versions. Clients could quite easily choose which version (shaded or non) they wish to depend on during their own development (and runtime, if they end up using those same jars for their runtime class path).

The shaded solution might be easier for some during development... but ultimately, what is on the runtime class path is determined by how the client software is packaged and configured when it is deployed, rather than what's specified in the Hadoop POM.

> 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
>            Priority: Blocker
>              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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org