Settings

Theme

Why Elastic Search Is Removing Google Guava

github.com

6 points by sirdavidhuang 10 years ago · 6 comments

Reader

sam_lowry_ 10 years ago

Where is the why?

  • Randgalt 10 years ago

    This should not be taken as a judgement on Guava. Guava is a popular library, and for good reasons. But the rationale here is rather simple:

    A lot of the benefits of Guava have been supplanted by additions to the JDK in JDK 7 and JDK 8 (e.g., the diamond operator, lambdas, and streams). We are no longer shading dependencies in the Elasticsearch jar (see #13252). We do not have a proper Java client today; this means that developers that depend on the Elasticsearch jar are likely going to have to deal with Guava version conflicts (which are likely since Guava is popular). Developers do embed Elasticsearch inside web containers which creates conflicts with the provided versions of Guava. Plugin developers encounter issues with Guava version conflicts (again, because Guava is popular). All else equal, fewer dependencies is a positive. In short, the internal benefits have been reduced, and there are external benefits to developers to removing Guava.

  • Randgalt 10 years ago

    It's there about 10 comments down or so

  • sirdavidhuangOP 10 years ago

    That's my question as well.

    • tomaha 10 years ago

      Especially if they want to keep parts like Splitter and Joiner and just copy them over. I just ran into too many libraries that copied Guava into their own namespace and now your project depends on x different copies of Guava indirectly. Besides that I find it strange to get rid of ImmutableList as I don't see any usable alternative. I also find the newXXX methods very helpful and much more readable (e.g. Maps#newHashMapWithExpectedSize) and preferable over constructor usage even with the diamond operator as it also allows you to change the implementation afterwards.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection