incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saravanan <suzuki_b...@yahoo.com>
Subject cql throw error when secondary timeuuid field use dateof()
Date Mon, 12 Aug 2013 01:13:39 GMT
Hi,

I am trying to create a comments table. Which has primary key timeuuid and secondary field
which also has timeuuid. 

when I do query using funtion dateof() it throws error and i needed to reconnect again. But
that query don't work at all.

cqlsh:demodb> select id,dateof(search_date) from news_comments;
TSocket read 0 bytes

it works fine if I do the same function for primarykey based timeuuid field

cqlsh:demodb> select id,dateof(created_date),search_date from news_comments;

 id  | dateof(created_date)     | search_date
-----+--------------------------+--------------------------------------
 105 | 2013-08-12 02:46:33+0200 | a2bb29d1-02e8-11e3-bc81-fb4a940b08ec
 105 | 2013-08-12 02:46:36+0200 | a4abd641-02e8-11e3-bc81-fb4a940b08ec
 105 | 2013-08-12 02:46:41+0200 | a7790001-02e8-11e3-bc81-fb4a940b08ec
 105 | 2013-08-12 02:46:44+0200 | a943d4f1-02e8-11e3-bc81-fb4a940b08ec
 100 | 2013-08-07 05:35:47+0200 |                                
null
 100 | 2013-08-07 05:35:58+0200 |                                
null
 100 | 2013-08-07 05:35:59+0200 |                                
null
 100 | 2013-08-07 05:36:00+0200 |                                
null

In systemlog i get following error.

ERROR [Thrift:4] 2013-08-12 03:08:28,303 CustomTThreadPoolServer.java (line 217) Error occurred
during processing of message.
java.lang.NullPointerException
    at org.apache.cassandra.utils.UUIDGen.getUUID(UUIDGen.java:76)
    at org.apache.cassandra.cql3.functions.TimeuuidFcts$4.execute(TimeuuidFcts.java:66)
    at org.apache.cassandra.cql3.statements.Selection$FunctionSelector.compute(Selection.java:361)
    at org.apache.cassandra.cql3.statements.Selection$SelectionWithFunctions.handleRow(Selection.java:436)
    at org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.newRow(Selection.java:275)
    at org.apache.cassandra.cql3.statements.SelectStatement.handleGroup(SelectStatement.java:842)
    at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:734)
    at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:134)
    at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:128)
    at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
    at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:118)
    at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:128)
    at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1707)
    at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074)
    at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
    at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Thanks,
Saravanan
Mime
View raw message