incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lansler <martin.lans...@gmail.com>
Subject SOLVED: Problem upgrading to 0.8.3 - "replication_factor is an option for SimpleStrategy, not NetworkTopologyStrategy"
Date Tue, 09 Aug 2011 21:11:19 GMT
Hi,

When I upgraded from 0.8.2 to 0.8.3 I encountered a exception during startup:
...
Caused by: org.apache.cassandra.config.ConfigurationException:
replication_factor is an option for SimpleStrategy, not
NetworkTopologyStrategy
	at org.apache.cassandra.locator.NetworkTopologyStrategy.<init>(NetworkTopologyStrategy.java:70)
...

This was caused by the following change:
--- cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java	2011/07/18
13:32:48	1147869
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java	2011/08/02
17:07:22	1153200
@@ -67,7 +67,7 @@
             {
                 String dc = entry.getKey();
                 if (dc.equalsIgnoreCase("replication_factor"))
-                    continue; // TODO remove this for 1.0
+                    throw new
ConfigurationException("replication_factor is an option for
SimpleStrategy, not NetworkTopologyStrategy");
                 Integer replicas = Integer.valueOf(entry.getValue());
                 newDatacenters.put(dc, replicas);
             }

To solve it use the 'cassandra-cli' on one of the other "up" nodes:

[default@unknown] describe keyspace TestKeyspace;
WARNING: Could not connect to the JMX on 127.0.0.3:7199, information
won't be shown.
Keyspace: TestKeyspace:
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
  Durable Writes: true
    Options: [replication_factor:2]
...

default@unknown] update keyspace TestKeyspace with
strategy_options=[{datacenter:2}];
47035d20-c2ca-11e0-0000-de5e2f7aa3bf
Waiting for schema agreement...
... schemas agree across the cluster

[default@unknown] describe keyspace TestKeyspace;
Keyspace: TestKeyspace:
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
  Durable Writes: true
    Options: [datacenter:2]

Then restart the 0.8.3 node and it should be fine.

Regards,
-Martin

Mime
View raw message