cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1024013 - in /cassandra/trunk: CHANGES.txt src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
Date Mon, 18 Oct 2010 21:33:05 GMT
Author: jbellis
Date: Mon Oct 18 21:33:04 2010
New Revision: 1024013

URL: http://svn.apache.org/viewvc?rev=1024013&view=rev
Log:
allow creating NTS keyspaces with no replicas configured
patch by jbellis; reviewed by gdusbabek for CASSANDRA-1626

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1024013&r1=1024012&r2=1024013&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Mon Oct 18 21:33:04 2010
@@ -43,6 +43,7 @@ dev
  * add cli support for binary data without CfDef hints (CASSANDRA-1603)
  * fix building SSTable statistics post-stream (CASSANDRA-1620)
  * fix potential infinite loop in 2ary index queries (CASSANDRA-1623)
+ * allow creating NTS keyspaces with no replicas configured (CASSANDRA-1626)
 
 
 0.7-beta2

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java?rev=1024013&r1=1024012&r2=1024013&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java Mon
Oct 18 21:33:04 2010
@@ -59,9 +59,12 @@ public class NetworkTopologyStrategy ext
         this.snitch = snitch;
 
         Map<String, Integer> newDatacenters = new HashMap<String, Integer>();
-        for (Entry entry : configOptions.entrySet())
+        if (configOptions != null)
         {
-            newDatacenters.put((String) entry.getKey(), Integer.parseInt((String) entry.getValue()));
+            for (Entry entry : configOptions.entrySet())
+            {
+                newDatacenters.put((String) entry.getKey(), Integer.parseInt((String) entry.getValue()));
+            }
         }
 
         datacenters = Collections.unmodifiableMap(newDatacenters);



Mime
View raw message