cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r911546 - /incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java
Date Thu, 18 Feb 2010 20:06:31 GMT
Author: jbellis
Date: Thu Feb 18 20:06:31 2010
New Revision: 911546

URL: http://svn.apache.org/viewvc?rev=911546&view=rev
Log:
fix NPE in DatacenterShardStrategy.  patch by vijay; reviewed by jbellis for CASSANDRA-787

Modified:
    incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java

Modified: incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java?rev=911546&r1=911545&r2=911546&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java
(original)
+++ incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/locator/DatacenterShardStategy.java
Thu Feb 18 20:06:31 2010
@@ -68,7 +68,7 @@
      */
     private synchronized void loadEndPoints(TokenMetadata metadata) throws IOException
     {
-        this.tokens = new ArrayList<Token>(tokens);
+        this.tokens = new ArrayList<Token>(metadata.sortedTokens());
         String localDC = ((DatacenterEndPointSnitch)snitch_).getLocation(InetAddress.getLocalHost());
         dcMap = new HashMap<String, List<Token>>();
         for (Token token : this.tokens)



Mime
View raw message