hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11656) Classpath isolation for downstream clients
Date Tue, 03 Mar 2015 01:03:18 GMT

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

Haohui Mai commented on HADOOP-11656:

bq. Honestly, I don't see a lot of value in that work. It's a lot of refactoring and restructuring,
and at the end of the day, you end up with (almost) as many library dependencies in the client
as you had before (if you keep guava, protobuf, jackson, etc. etc. in the client)

Just to want to make sure that the value of a HDFS client jar (HDFS-6200) is appreciated.
I'm not an expert in YARN, thus I only provide my two cents from the HDFS prospective here.

Ignore the amount of the work that would take us there, I would argue that creating a client
jar is the correct approach based on technical merits. It's silly to force users to access
HDFS to depend on Jetty 6, jersey-server, even if you manage to load them in a perfect classloader.

bq. The split would also introduce more complexity in the build... you can expect that a lot
of "class not found" errors would be popping up for a while. 

The point of creating a HDFS client jar is not just simply moving the bits from A to B. A
more important aspect is to pick the more "stable" dependency in the process -- for example,
the client jar should at least avoid using any Guava features as we know that Guava APIs are
not stable.

bq. It's nice to have fewer jars on the classpath, but that's a pretty minor benefit compared
with the amount of work it would take to split this out. The split would also introduce more
complexity in the build... you can expect that a lot of "class not found" errors would be
popping up for a while. 

What HDFS-6200 shows is that the approach is feasible. Indeed there are quite a bit of work
but I don't think it is insurmountable. I'm also concerned that the complexity of the classloader
approach is underestimated. Errors will show up only at run-time until the classloader attempts
to load the dependency.

bq. since nearly every Hadoop install co-locates the DNs and the clients.

This was true in the old days, but as new use cases emerge it might not be the case in the
future. As more data are being pumped into HDFS, there are more and more terminals that access
the data of HDFS. People are creating libraries (e.g., Snakebite, libhdfs3) just to HDFS.
People will certainly benefit it a thin HDFS client is available.

> 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
> 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