cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject [3/3] git commit: remove dead code
Date Wed, 18 Jul 2012 15:36:10 GMT
remove dead code


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

Branch: refs/heads/vnodes
Commit: c0a7c032c86d266d6a1d28edcd3c116909cf7d31
Parents: 8821e8b
Author: Eric Evans <eevans@apache.org>
Authored: Wed Jul 18 10:31:56 2012 -0500
Committer: Eric Evans <eevans@apache.org>
Committed: Wed Jul 18 10:31:56 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |   25 ---------------
 1 files changed, 0 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c0a7c032/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 99fbd84..b5d6d20 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2882,31 +2882,6 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
         // calculate ownership per dc
         for (Collection<InetAddress> endpoints : endpointsGroupedByDc)
         {
-            // sort the endpoints by their tokens
-            List<InetAddress> sortedEndpoints = Lists.newArrayListWithExpectedSize(endpoints.size());
-            sortedEndpoints.addAll(endpoints);
-
-            Collections.sort(sortedEndpoints, new Comparator<InetAddress>()
-            {
-                public int compare(InetAddress o1, InetAddress o2)
-                {
-                    byte[] b1 = o1.getAddress();
-                    byte[] b2 = o2.getAddress();
-
-                    if(b1.length < b2.length) return -1;
-                    if(b1.length > b2.length) return 1;
-
-                    for(int i = 0; i < b1.length; i++)
-                    {
-                        int left = (int)b1[i] & 0xFF;
-                        int right = (int)b2[i] & 0xFF;
-                        if (left < right)       return -1;
-                        else if (left > right)  return 1;
-                    }
-                    return 0;
-                }
-            });
-
             // calculate the ownership with replication and add the endpoint to the final
ownership map
             for (InetAddress endpoint : endpoints)
             {


Mime
View raw message