Re: Creating counter columns in cassandra

2012-08-01 Thread Pushpalanka Jayawardhana
Hi All, I faced this same problem when trying to query the counter values. I am using a phone number as row key and updating the number of calls taken to that number. So my query is like SELECT KEY FROM columnFamily WHERE No_of_Calls5 This does not return any data, neither any exception, though

Re: Creating counter columns in cassandra

2012-07-31 Thread Amila Paranawithana
Hi all, Thanks all for the valuable feedback. I have a problem with running queries with Cqlsh. My query is SELECT * FROM rule1 WHERE sms=3; java.lang.NumberFormatException: An hex string representing bytes must have an even length at org.apache.cassandra.utils.Hex.hexToBytes(Hex.java:52) at

Re: Creating counter columns in cassandra

2012-07-29 Thread Abhijit Chanda
There should be at least one = (equals) in the WHERE case on key or secondary index column, this is the Cassandra limitation.

Re: Creating counter columns in cassandra

2012-07-29 Thread Paolo Bernardi
On Sun, Jul 29, 2012 at 9:30 AM, Abhijit Chanda abhijit.chan...@gmail.com wrote: There should be at least one = (equals) in the WHERE case on key or secondary index column, this is the Cassandra limitation. Yep, it's still there (see validateFilterClauses from line 531):

Re: Creating counter columns in cassandra

2012-07-28 Thread Amila Paranawithana
Thanks Tamar and all.. :) Since I want to do queries like SELECT * FROM counters WHERE CounterColumnName1; I want to index my counter columns, and I use the following code. But I get the following error Exception in thread main me.prettyprint.hector.api.exceptions.HInvalidRequestException:

Re: Creating counter columns in cassandra

2012-07-26 Thread Tamar Fraenkel
Hi To create: ColumnFamilyDefinition counters = createBasicCfDef( KEYSPACE, Consts.COUNTERS, ComparatorType.UTF8TYPE, null, CounterColumnType, CompositeType(UTF8Type,UUIDType)); counters.setReplicateOnWrite(true); cluster.addColumnFamily(counters, true); to

Re: Creating counter columns in cassandra

2012-07-26 Thread Abhijit Chanda
You can check Astyanax API https://github.com/Netflix/astyanax/blob/5c05d118e22eef541a7a201adf7c1c610da13f5b/src/test/java/com/netflix/astyanax/thrift/ThrifeKeyspaceImplTest.java There are some counter column example which will surely help you.

Re: Creating counter columns in cassandra

2012-07-26 Thread Vivek Mishra
Check out Kundera for Counter column support. Here is the link for Counter column tests: https://github.com/impetus-opensource/Kundera/tree/kundera-2.0.7/kundera-cassandra/src/test/java/com/impetus/client/crud/countercolumns -Vivek On Thu, Jul 26, 2012 at 12:27 PM, Abhijit Chanda