cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Goffinet (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-2535) CQL create keyspace throws exceptions
Date Thu, 21 Apr 2011 22:46:05 GMT
CQL create keyspace throws exceptions
-------------------------------------

                 Key: CASSANDRA-2535
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2535
             Project: Cassandra
          Issue Type: Bug
            Reporter: Chris Goffinet


Was trying out CQL:

cqlsh> create keyspace foo with replication_factor=1 and strategy_class='org.apache.cassandra.locator.SimpleStrategy';
Bad Request: org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires a
replication_factor strategy option.

On Cassandra side:

 INFO 15:41:14,423 Applying migration 768b63c0-6c68-11e0-0000-242d50cf1fbf Add keyspace: foorep
strategy:SimpleStrategy{}
 INFO 15:41:14,424 Enqueuing flush of Memtable-Migrations@17649447(6489/8111 serialized/live
bytes, 1 ops)
 INFO 15:41:14,425 Enqueuing flush of Memtable-Schema@186829279(2599/3248 serialized/live
bytes, 3 ops)
 INFO 15:41:14,425 Writing Memtable-Migrations@17649447(6489/8111 serialized/live bytes, 1
ops)
 INFO 15:41:14,435 Completed flushing /var/lib/cassandra/data/system/Migrations-f-1-Data.db
(6553 bytes)
 INFO 15:41:14,436 Writing Memtable-Schema@186829279(2599/3248 serialized/live bytes, 3 ops)
 INFO 15:41:14,449 Completed flushing /var/lib/cassandra/data/system/Schema-f-1-Data.db (2749
bytes)
ERROR 15:41:14,452 Fatal exception in thread Thread[MigrationStage:1,5,main]
java.lang.RuntimeException: org.apache.cassandra.config.ConfigurationException: SimpleStrategy
requires a replication_factor strategy option.
	at org.apache.cassandra.db.Table.<init>(Table.java:278)
	at org.apache.cassandra.db.Table.open(Table.java:110)
	at org.apache.cassandra.db.migration.AddKeyspace.applyModels(AddKeyspace.java:74)
	at org.apache.cassandra.db.migration.Migration.apply(Migration.java:154)
	at org.apache.cassandra.cql.QueryProcessor$1.call(QueryProcessor.java:339)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.cassandra.config.ConfigurationException: SimpleStrategy requires a replication_factor
strategy option.
	at org.apache.cassandra.locator.SimpleStrategy.validateOptions(SimpleStrategy.java:79)
	at org.apache.cassandra.locator.AbstractReplicationStrategy.createReplicationStrategy(AbstractReplicationStrategy.java:262)
	at org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:328)
	at org.apache.cassandra.db.Table.<init>(Table.java:274)
	... 9 more
 INFO 15:41:37,210 Applying migration 843c7c70-6c68-11e0-0000-242d50cf1fbf Drop keyspace:
foo
 INFO 15:41:37,211 Enqueuing flush of Memtable-Migrations@1289702396(6372/7965 serialized/live
bytes, 1 ops)
 INFO 15:41:37,211 Writing Memtable-Migrations@1289702396(6372/7965 serialized/live bytes,
1 ops)
 INFO 15:41:37,212 Enqueuing flush of Memtable-Schema@1475720401(2529/3161 serialized/live
bytes, 2 ops)
 INFO 15:41:37,222 Completed flushing /var/lib/cassandra/data/system/Migrations-f-2-Data.db
(6436 bytes)
 INFO 15:41:37,223 Writing Memtable-Schema@1475720401(2529/3161 serialized/live bytes, 2 ops)
 INFO 15:41:37,244 Completed flushing /var/lib/cassandra/data/system/Schema-f-2-Data.db (2679
bytes)

The keyspace gets created anyway and I can no longer drop it, I get this message:

cqlsh> drop keyspace foo;
Exception: TSocket read 0 bytes


ERROR 15:41:37,246 Fatal exception in thread Thread[MigrationStage:1,5,main]
java.lang.AssertionError
	at org.apache.cassandra.db.migration.DropKeyspace.applyModels(DropKeyspace.java:81)
	at org.apache.cassandra.db.migration.Migration.apply(Migration.java:154)
	at org.apache.cassandra.cql.QueryProcessor$1.call(QueryProcessor.java:339)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
ERROR 15:41:37,246 Thrift error occurred during processing of message.
org.apache.thrift.protocol.TProtocolException: Required field 'why' was not present! Struct:
InvalidRequestException(why:null)
	at org.apache.cassandra.thrift.InvalidRequestException.validate(InvalidRequestException.java:334)
	at org.apache.cassandra.thrift.InvalidRequestException.write(InvalidRequestException.java:303)
	at org.apache.cassandra.thrift.Cassandra$execute_cql_query_result.write(Cassandra.java:32011)
	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4091)
	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message