Guava 20 compatibility

Description

With Guava 20 being recently released (Release20) there are a few incompatibilities that prevent it working with the java driver, namely:

  • Futures.withFallback => Futures.catchingAsync

  • Futures.transform with AsyncFunction => transformAsync

  • TypeToken#isAssignableFrom => TypeToken#isSupertypeOf

  • MoreExecutors.sameThreadExecutor() => MoreExecutors.directExecutor() / MoreExecutors.newDirectExecutorService()

  • Objects => MoreObjects

  • Sets.newSetFromMap => Collections.newSetFromMap

Should investigate if we could somehow support Guava 20 and older versions (back to 16.01).

Environment

None

Pull Requests

None

Activity

Show:
Alexandre Dutra
April 4, 2017, 10:23 AM

I remember that the statu quo back in 2015 was already hard on you. We have never been particularly supportive of Guava. The only reason we did not attempt to remove it completely in 3.0 is because we still have users on JDK 6 and 7.

Version 4.0 aims to be a complete rewrite of the driver internals and should drop support for JDK 6 and 7. We are actively working on it currently, but there is no timeframe available yet. I think your best option right now is to upgrade to 3.2.0 as soon as you can.

Brice Dutheil
April 7, 2017, 1:39 PM

For easy upgrade from 3.x to 4.x, please think about a compatibility library (that maps guava types to/from java8 types) so 3.x users can use the 4.x driver and migrate their code at their own pace.

Alexandre Dutra
April 7, 2017, 2:54 PM

That is already in our todo list

xaerxess
May 30, 2017, 12:29 PM

Version 4.0 aims to be a complete rewrite of the driver internals and should drop support for JDK 6 and 7. We are actively working on it currently, but there is no timeframe available yet. I think your best option right now is to upgrade to 3.2.0 as soon as you can.

Do you mean to use CompletableFuture instead of Guava's ListenableFuture in 4.x? Is there any list of changes / roadmap?

Alexandre Dutra
August 1, 2017, 4:23 PM

Driver 4.0.0-alpha1 is out. No more Guava No compatibility layer at this point, but if you think you need one, please open a ticket for that.

Fixed

Assignee

Unassigned

Reporter

Andy Tolbert

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure