Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 2738e8678 -> 3fe702825
  refs/heads/cassandra-2.0 6e73a5179 -> 40deb9115
  refs/heads/cassandra-2.1 f08785fcc -> 607f56800
  refs/heads/cassandra-2.1.0 fe4c8c2c5 -> 5d6632223
  refs/heads/trunk b6ce0a6bb -> 2eae43649


Remove duplicates from StorageService.getJoiningNodes
patch by jbellis; reviewed by ayeschenko for CASSANDRA-7478


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3fe70282
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3fe70282
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3fe70282

Branch: refs/heads/cassandra-1.2
Commit: 3fe702825e882398052fa26b230861aac47a0671
Parents: 2738e86
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Wed Aug 13 10:22:00 2014 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Wed Aug 13 10:22:00 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 src/java/org/apache/cassandra/utils/BiMultiValMap.java    | 5 +++++
 3 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3fe70282/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5dd3ad2..4c261c9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.19
+ * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478)
  * Clone token map outside of hot gossip loops (CASSANDRA-7758)
  * Add stop method to EmbeddedCassandraService (CASSANDRA-7595)
  * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3fe70282/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 563b259..4ffa4b2 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2115,7 +2115,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
     public List<String> getJoiningNodes()
     {
-        return stringify(tokenMetadata.getBootstrapTokens().values());
+        return stringify(tokenMetadata.getBootstrapTokens().valueSet());
     }
 
     public List<String> getLiveNodes()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3fe70282/src/java/org/apache/cassandra/utils/BiMultiValMap.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/BiMultiValMap.java 
b/src/java/org/apache/cassandra/utils/BiMultiValMap.java
index 3712d25..2cc11b2 100644
--- a/src/java/org/apache/cassandra/utils/BiMultiValMap.java
+++ b/src/java/org/apache/cassandra/utils/BiMultiValMap.java
@@ -138,4 +138,9 @@ public class BiMultiValMap<K, V> implements Map<K, V>
     {
         return reverseMap.keys();
     }
+
+    public Collection<V> valueSet()
+    {
+        return reverseMap.keySet();
+    }
 }

Reply via email to