Using Cassandra 1.1.0 on Linux, Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode).
There may be several issues here, including user error most likely, but the result is that trying to start Cassandra now bails with a null pointer exception.
Background:
1) We found that phpcassa cannot correctly return data from the dummy 'timeline' table, created thus, and have been exploring why:
CREATE TABLE timeline (
user_id varchar,
tweet_id uuid,
author varchar,
body varchar,
PRIMARY KEY (user_id, tweet_id)
);
2) A 'show schema' showed that there's no column metadata created in a CF with compound primary - maybe that's correct or perhaps a CQL3 issue, we're not sure.
3) The key validation class was also not compound - probably correct but not sure.
4) Decided to try altering the key_validation_class as follows and the result was a transport exception after Cassandra blew up and now a null pointer exceptions at startup.
[default@demodb] update column family timeline with key_validation_class = 'CompositeType(UUIDType,UTF8Type)';
org.apache.thrift.transport.TTransportException
5) So we presumably did something dumb to the schema, but these things could potentially happen in a live setting. How can we recover without significant dataloss and correct the schema if necessary so that the server can start?
The startup backtrace is:
/var/lib/cassandra/data/system/LocationInfo/system-LocationInfo-hc-17 (346 bytes)
ERROR 17:01:11,060 Exception encountered during startup
java.lang.NullPointerException
at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:163)
at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:120)
at org.apache.cassandra.cql.jdbc.JdbcUTF8.getString(JdbcUTF8.java:77)
at org.apache.cassandra.cql.jdbc.JdbcUTF8.compose(JdbcUTF8.java:97)
at org.apache.cassandra.db.marshal.UTF8Type.compose(UTF8Type.java:35)
at org.apache.cassandra.cql3.UntypedResultSet$Row.getString(UntypedResultSet.java:87)
at org.apache.cassandra.config.ColumnDefinition.fromSchema(ColumnDefinition.java:256)
at org.apache.cassandra.config.CFMetaData.addColumnDefinitionSchema(CFMetaData.java:1261)
at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1193)
at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:291)
at org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:272)
at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:158)
at org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:533)
at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:182)
at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:353)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106)
