Skip to content
UNMAINTAINED! hopefully some kind of usable cassandra client, hiding the horrible thrift api.
Erlang Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
include
priv
src
.gitignore
README.md
rebar.config
watchr.rb

README.md

Basic Wrapper for the Cassandra 0.8 Thrift Bindings.

I wanted to play with Cassandra from erlang and the default Thrift Bindings are horrible, so I made this. Might be just as horrible but works for me.

EXAMPLE

C = cassandra_client:connect([{host, "localhost"}, {port, 9160}, {keyspace, "test"}]),

{ok, Version} = C:describe_version(),

ConsistencyLevel = one,

ok = C:mutate([
    {"row", "cf", {insert, [{"col", "value"}]}
], ConsistencyLevel),

{ok, Columns} = C:get_column_slice("row", "cf", [{count, 10}], ConsistencyLevel),

% return values from cassandra are binaries

Columns = [{<<"col">>, <<"value">>}].

Docs

Basic edoc at: http://thheller.github.com/cassandra-erl/

TODO

  • SuperColumns
  • Error Handling (pure let-it-crash for now)
  • Ring Detection, Client Pooling, Reconnects, etc.
Something went wrong with that request. Please try again.