cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-4489) LCS with Composite Columns NPE
Date Thu, 09 Aug 2012 12:02:20 GMT

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

Pavel Yaskevich updated CASSANDRA-4489:
---------------------------------------

    Attachment: CASSANDRA-4489.patch

That happens because CQL3 has metadata that is not exposed through thrift CfDef API so when
CLI is used to update ColumnFamily defined/used by CQL3 it would be missing such metadata,
I'm attaching a patch to fix that but I think if one wants to use CQL3 one better stick with
it for all operations.
                
> LCS with Composite Columns NPE
> ------------------------------
>
>                 Key: CASSANDRA-4489
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4489
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.2
>         Environment: Mac OS X 10.8 
> java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Wing Lian
>            Assignee: Pavel Yaskevich
>             Fix For: 1.1.4
>
>         Attachments: CASSANDRA-4489.patch
>
>
> Creating the CF in cqlsh -3
> cqlsh> CREATE KEYSPACE tt WITH strategy_class=SimpleStrategy AND strategy_options:replication_factor=1;
> cqlsh> USE tt;
> cqlsh:tt> CREATE TABLE breakable (
>       ...   dt timestamp,
>       ...   id timeuuid,
>       ...   metadata text,
>       ...   PRIMARY KEY (dt, id)
>       ... );
> cqlsh:tt> 
> Then changing to LCS using the CLI
> [default@unknown] use tt;
> Authenticated to keyspace: tt
> [default@tt] update column family breakable with compaction_strategy=LeveledCompactionStrategy;
> org.apache.thrift.transport.TTransportException
> And then trying to view the table schema
> cqlsh:tt> describe table breakable;
> 'NoneType' object has no attribute 'startswith'
> cqlsh:tt> 
> Restarting cassandra causes an NPE
> ERROR 17:10:53,487 Exception encountered during startup
> java.lang.NullPointerException
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:167)
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:124)
> 	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:1293)
> 	at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1225)
> 	at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:294)
> 	at org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:275)
> 	at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:158)
> 	at org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:535)
> 	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)
> java.lang.NullPointerException
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:167)
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:124)
> 	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:1293)
> 	at org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1225)
> 	at org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:294)
> 	at org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:275)
> 	at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:158)
> 	at org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:535)
> 	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)
> Exception encountered during startup: null

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message