Martin,

Thanks for the report!  (Did I miss an earlier email about this?
Because SOLVED is the first I saw.)

I've created https://issues.apache.org/jira/browse/CASSANDRA-3011 and
attached a patch to fix the problem.

On Tue, Aug 9, 2011 at 4:11 PM, Martin Lansler <martin.lans...@gmail.com> wrote:
> 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
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Reply via email to