Guava 16

71 views
Skip to first unread message

cal...@snapchat.com

unread,
Feb 13, 2018, 11:46:38 AM2/13/18
to Druid Development
The fact that we are very stuck on Guava 16 is a pain point any time druid needs to interact with some other framework. This thread is a collection of other major frameworks and what version of Guava they are on.

This has the not-so-subtle intention of driving a solution so that we are not stuck on Guava 16 forever


AWS Java SDK : Guava 18.0 AND Guava 16.0.1 : Transitive dependencies

Hadoop is one of the main reasons not to move forward, but how long do we want to be stuck on Hadoop's gauva dependency given so many other Apache (and non apache) frameworks are slowly moving beyond it?

Gian Merlino

unread,
Feb 13, 2018, 12:04:25 PM2/13/18
to druid-de...@googlegroups.com
Sometimes I feel like the Guava maintainers are engaged in an elaborate troll on the Java world. They made a utility library that got embedded in a ton of projects and they constantly add and remove APIs. I wonder if we should deal with the situation by removing the Guava dependency and instead copying any code we need into the Druid codebase. The license would allow it. Some of it is arguably obsoleted by Java 8 so we could also migrate some of that. Here's what we use (along with frequency): https://gist.github.com/gianm/efbfbfebfa0601984a7206755e2d3f09

We could also build a relocated Guava jar (replace com.google.common. with io.druid.guava.) and depend on that in Druid, rather than literally copying the code. It would make it easier to upgrade to newer Guavas.

Gian

--
You received this message because you are subscribed to the Google Groups "Druid Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-development+unsubscribe@googlegroups.com.
To post to this group, send email to druid-development@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-development/307e5025-893d-4f3a-950b-e4dede4ba953%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Himanshu Gupta

unread,
Feb 13, 2018, 12:45:36 PM2/13/18
to Druid Development
Gian's suggestion sounds good to me.

It will probably still show up in Druid distro due to the transitive dependencies... but good for Druid to get rid of it as direct dependency.

-- Himanshu

Roman Leventov

unread,
Feb 13, 2018, 1:06:16 PM2/13/18
to druid-de...@googlegroups.com

Julian Hyde

unread,
Feb 13, 2018, 4:46:03 PM2/13/18
to druid-de...@googlegroups.com
“Adding a relocated guava jar” is what quite a lot of other projects do. maven-shade-plugin is the way to do it. Shading usually works well, but it becomes problematic if you use Guava classes (e.g. ImmutableList) in Druid’s public APIs.

Speaking in Guava’s defense. They adhere to the letter of the law of semantic versioning. I.e. give a couple of major versions notice before removing APIs. The problem is that they release a couple of major versions per year.

In Calcite we were not able to shade, because we use Guava APIs in our public interface. Our strategy has been to stop using classes that are removed in later versions of Guava, and not use classes that are not present in Guava 14. As a result we can use any Guava between 14 and 22. I don’t know whether that’s a possibility for Druid.

Julian


To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-development/CAB5L%3DwdJW2B7W_JhOAuJO4DQ8DxuvksPWU63njC48FDjW7Z56g%40mail.gmail.com.

cal...@snapchat.com

unread,
Feb 22, 2018, 1:48:52 AM2/22/18
to Druid Development
Took a crack at this looking at things that break in upcoming Guava releases. Came up with two PRs:

Gian

To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Druid Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-developm...@googlegroups.com.
To post to this group, send email to druid-de...@googlegroups.com.

cal...@snapchat.com

unread,
Feb 22, 2018, 1:49:28 AM2/22/18
to Druid Development
So this way, even if we don't shade Guava, at least we have a wide swath of version compatibility 

Julian Hyde

unread,
Feb 23, 2018, 4:08:59 PM2/23/18
to druid-de...@googlegroups.com
Also, Guava deprecated Throwables.propagate in Guava 20. So, wise to stop using that now.



Reply all
Reply to author
Forward
0 new messages