cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [02/15] git commit: Remove duplicates from StorageService.getJoiningNodes patch by jbellis; reviewed by ayeschenko for CASSANDRA-7478
Date Wed, 13 Aug 2014 15:23:25 GMT
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-2.0
Commit: 3fe702825e882398052fa26b230861aac47a0671
Parents: 2738e86
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Aug 13 10:22:00 2014 -0500
Committer: Jonathan Ellis <jbellis@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();
+    }
 }


Mime
View raw message