ruby - Unable to use cassandra counter column with cassandra gem -


i have created column family following command using cqlsh:

create table mystats (key primary key, count counter); 

now cqlsh able increase counter column when attempt cassandra gem, adviced at: are there ruby clients cassandra counters , supercolumn?

so when use:

@stats.add(:mystats, 'randomkey', 1, 'count') 

i error:

cassandra::accesserror @ /client invalid column family "mystats"

when further looked it, found error raised gem: in file: https://github.com/twitter/cassandra/blob/master/lib/cassandra/columns.rb

def column_family_property(column_family, key)       cfdef = schema.cf_defs.find {|cfdef| cfdef.name == column_family }       unless cfdef         raise accesserror, "invalid column family \"#{column_family}\""       end       cfdef.send(key)     end 

can please point out might doing wrong here..

that client has not yet been updated support cql3. i'm not aware of cql3-aware ruby client, best bet create thrift-compatible table (tldr add with compact storage table definition).


Comments