You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ted Zlatanov <tz...@lifelogs.com> on 2010/03/15 21:43:15 UTC

Net::Cassandra::Easy Perl interface to Cassandra 0.03

You can find version 0.03 of the Net::Cassandra::Easy Perl module at:

http://search.cpan.org/search?query=cassandra+easy&mode=all

(it may show 0.021 but that's the same as 0.03, I just uploaded with the
incorrect version number accidentally)

The docs explain how to use it with examples for the common cases.
There are only three N::C::Easy methods: connect(), get(), and mutate()
so it's pretty easy to learn and use, from a one-liner or from a large
program.

Please let me know if you have bugs or suggestions.

N::C::Easy will track cassandra.thrift closely but also will be able to
switch to Avro or another API easily since it avoids Thrift-specific
code on the user side as much as possible.

You can also use the Net::Cassandra module by Leon Brocard, of course.
It works fine and is much more Thrift-oriented.

Ted


Net::Cassandra::Easy Perl interface (with cassidy.pl CLI) 0.08

Posted by Ted Zlatanov <tz...@lifelogs.com>.
You can find version 0.08 of the Net::Cassandra::Easy Perl module at:
http://search.cpan.org/search?query=cassandra+easy&mode=all

This version comes with cassidy.pl, a command-line interface that
supports tab-completion.  It's not finished (no docs yet, that's a TODO)
but in its current form it will:

- autocomplete command name

- autocomplete family name

- autocomplete key name (when possible, this is a TODO)

- autocomplete supercolumn name

- parse and insert LongTypes correctly for autocompletion and elsewhere

- limit gets to 100 or less

- doesn't handle commas or spaces in names (TODO)

- doesn't handle non-Super CFs (TODO)

The Long autocompletion is clever: given "100" it will generate ranges
of 1000 to 1009, 10000 to 10099, etc. so you'll get back the
supercolumns that start with "100" in decimal.

Examples of queries:

ins Super1 testrow testcolumn key1=value1 # insert supercolumn "testcolumn" with some data

get Super1 testrow testcolumn,-2          # get testcolumn and the last 2 SCs (prints in a parseable format)

del Super1 testrow testcolumn             # delete testcolumn

keys Super1                               # get the keys

desc                                      # describe the keyspace

The queries can also be passed from the command line, e.g.

./cassidy.pl -server myserver -port 9160 -keyspace Keyspace1 'query1' 'query2'

I'm using it internally but thought perhaps it will be useful to others.
The autocompletion is especially handy.

Ted