cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cathy Daw (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2525) CQL: create keyspace does not the replication factor argument and allows invalid sql to pass thru
Date Thu, 21 Apr 2011 01:47:06 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cathy Daw updated CASSANDRA-2525:
---------------------------------

    Description: 
I ran the following SQL in cqlsh and immediately received a socket closed error.  After that
point, I couldn't run nodetool, and then got an exception starting up the cluster.

Please Note:  The following syntax is valid in 0.74 but invalid in 0.8.
The 0.8 cassandra-cli errors on the following statement, so the resolution of the bug is to
have cqlsh block this incorrect syntax.

{code}
create keyspace testcli with replication_factor=1
and placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy';
{code}

{code}
CREATE KEYSPACE testcql with replication_factor = 1 and strategy_class = 'org.apache.cassandra.locator.SimpleStrategy';

{code}


{code}
ERROR 01:29:26,989 Exception encountered during startup.
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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
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)
	... 4 more
Exception encountered during startup.
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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
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)
	... 4 more
{code}

  was:
I ran the following SQL in cqlsh and immediately received a socket closed error.  After that
point, I couldn't run nodetool, and then got an exception starting up the cluster.


{code}
CREATE KEYSPACE testcql with replication_factor = 1 and strategy_class = 'org.apache.cassandra.locator.SimpleStrategy';

{code}


{code}
ERROR 01:29:26,989 Exception encountered during startup.
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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
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)
	... 4 more
Exception encountered during startup.
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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
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)
	... 4 more
{code}

        Summary: CQL: create keyspace does not the replication factor argument and allows
invalid sql to pass thru  (was: Error creating a keyspace using CQL)

> CQL: create keyspace does not the replication factor argument and allows invalid sql
to pass thru
> -------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2525
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2525
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>         Environment: Cluster: 3 node Rackspace cluster running Centos 5.5.
> Build: https://builds.apache.org/hudson/job/Cassandra/859/artifact/cassandra/build/apache-cassandra-2011-04-20_10-01-29-bin.tar.gz
>            Reporter: Cathy Daw
>            Priority: Critical
>              Labels: cql
>
> I ran the following SQL in cqlsh and immediately received a socket closed error.  After
that point, I couldn't run nodetool, and then got an exception starting up the cluster.
> Please Note:  The following syntax is valid in 0.74 but invalid in 0.8.
> The 0.8 cassandra-cli errors on the following statement, so the resolution of the bug
is to have cqlsh block this incorrect syntax.
> {code}
> create keyspace testcli with replication_factor=1
> and placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy';
> {code}
> {code}
> CREATE KEYSPACE testcql with replication_factor = 1 and strategy_class = 'org.apache.cassandra.locator.SimpleStrategy';

> {code}
> {code}
> ERROR 01:29:26,989 Exception encountered during startup.
> 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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
> 	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
> 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)
> 	... 4 more
> Exception encountered during startup.
> 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.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:160)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:314)
> 	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
> 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)
> 	... 4 more
> {code}

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

Mime
View raw message