cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r982037 - in /cassandra/trunk/src/java/org/apache/cassandra/locator: DatacenterShardStrategy.java RackAwareStrategy.java RackUnawareStrategy.java
Date Tue, 03 Aug 2010 21:21:01 GMT
Author: brandonwilliams
Date: Tue Aug  3 21:20:57 2010
New Revision: 982037

URL: http://svn.apache.org/viewvc?rev=982037&view=rev
Log:
Revert r980983

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/locator/DatacenterShardStrategy.java
    cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java
    cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/DatacenterShardStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/DatacenterShardStrategy.java?rev=982037&r1=982036&r2=982037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/DatacenterShardStrategy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/DatacenterShardStrategy.java Tue
Aug  3 21:20:57 2010
@@ -74,7 +74,7 @@ public class DatacenterShardStrategy ext
         int totalReplicas = getReplicationFactor();
         Map<String, Integer> remainingReplicas = new HashMap<String, Integer>(datacenters);
         Map<String, Set<String>> dcUsedRacks = new HashMap<String, Set<String>>();
-        Set<InetAddress> endpoints = new LinkedHashSet<InetAddress>(totalReplicas);
+        Set<InetAddress> endpoints = new HashSet<InetAddress>(totalReplicas);
 
         // first pass: only collect replicas on unique racks
         for (Iterator<Token> iter = TokenMetadata.ringIterator(tokenMetadata.sortedTokens(),
searchToken);

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java?rev=982037&r1=982036&r2=982037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java Tue Aug 
3 21:20:57 2010
@@ -42,7 +42,7 @@ public class RackAwareStrategy extends A
     public Set<InetAddress> calculateNaturalEndpoints(Token token, TokenMetadata metadata)
     {
         int replicas = getReplicationFactor();
-        Set<InetAddress> endpoints = new LinkedHashSet<InetAddress>(replicas);
+        Set<InetAddress> endpoints = new HashSet<InetAddress>(replicas);
         ArrayList<Token> tokens = metadata.sortedTokens();
 
         if (tokens.isEmpty())

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java?rev=982037&r1=982036&r2=982037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java Tue Aug
 3 21:20:57 2010
@@ -41,7 +41,7 @@ public class RackUnawareStrategy extends
     {
         int replicas = getReplicationFactor();
         ArrayList<Token> tokens = metadata.sortedTokens();
-        Set<InetAddress> endpoints = new LinkedHashSet<InetAddress>(replicas);
+        Set<InetAddress> endpoints = new HashSet<InetAddress>(replicas);
 
         if (tokens.isEmpty())
             return endpoints;



Mime
View raw message