kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | c831709877fba9984fb7d111214bf2b209d45665f5c09c58a98a1076c6e39634 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-10-27 17:48 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-10-27 17:50 +01:00 |
| Parents | 952ea975f811 |
4 files changed
modified driver-core/CHANGELOG.rst +1 −0
| @@ -26,6 +26,7 @@ | ||
| 26 | 26 | an explicit but null or empty local datacenter (JAVA-451). |
| 27 | 27 | - [bug] Fix check for local contact points in DCAware policy's init (JAVA-511) |
| 28 | 28 | - [improvement] Make timeout on saturated pool customizable (JAVA-457) |
| 29 | +- [improvement] Downgrade Guava to 14.0.1 (JAVA-521) | |
| 29 | 30 | |
| 30 | 31 | |
| 31 | 32 | 2.0.6: |
modified driver-core/pom.xml +5 −1
| @@ -36,7 +36,11 @@ | ||
| 36 | 36 | <dependency> |
| 37 | 37 | <groupId>com.google.guava</groupId> |
| 38 | 38 | <artifactId>guava</artifactId> |
| 39 | - <version>16.0.1</version> | |
| 39 | + <!-- | |
| 40 | + We use an old version of Guava to be compatible with Spark 1.1. | |
| 41 | + Check with the spark-cassandra-connector team before upgrading this. | |
| 42 | + --> | |
| 43 | + <version>14.0.1</version> | |
| 40 | 44 | </dependency> |
| 41 | 45 | |
| 42 | 46 | <dependency> |
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +1 −1
| @@ -2130,7 +2130,7 @@ | ||
| 2130 | 2130 | private static final int INTERVAL_MS = 15000; |
| 2131 | 2131 | |
| 2132 | 2132 | private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(1, threadFactory("Reaper-%d")); |
| 2133 | - private final Set<Connection> connections = Sets.newConcurrentHashSet(); | |
| 2133 | + private final Set<Connection> connections = Sets.newSetFromMap(new ConcurrentHashMap<Connection, Boolean>()); | |
| 2134 | 2134 | |
| 2135 | 2135 | private volatile boolean shutdown; |
| 2136 | 2136 |
modified driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java +3 −2
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | package com.datastax.driver.core.policies; |
| 2 | 2 | |
| 3 | 3 | import java.util.*; |
| 4 | +import java.util.concurrent.ConcurrentHashMap; | |
| 4 | 5 | import java.util.concurrent.locks.Lock; |
| 5 | 6 | import java.util.concurrent.locks.ReentrantLock; |
| 6 | 7 | |
| @@ -25,8 +26,8 @@ | ||
| 25 | 26 | public class LimitingLoadBalancingPolicy extends DelegatingLoadBalancingPolicy { |
| 26 | 27 | private final int maxHosts; |
| 27 | 28 | private final int threshold; |
| 28 | - private final Set<Host> liveHosts = Sets.newConcurrentHashSet(); | |
| 29 | - private final Set<Host> chosenHosts = Sets.newConcurrentHashSet(); | |
| 29 | + private final Set<Host> liveHosts = Sets.newSetFromMap(new ConcurrentHashMap<Host, Boolean>()); | |
| 30 | + private final Set<Host> chosenHosts = Sets.newSetFromMap(new ConcurrentHashMap<Host, Boolean>()); | |
| 30 | 31 | private final Lock updateLock = new ReentrantLock(); |
| 31 | 32 | |
| 32 | 33 | private volatile Cluster cluster; |