Middleware::NoSQL::Cassandra

CassandraをWindowsで使う

LinuxやMacOSXの場合はREADME読んで。

インストール

バイナリが用意されているので適当な場所にDLして展開。
展開してできたフォルダのパスをCASSANDRA_HOMEとして環境変数に設定する。

サーバー起動

%CASSANDRA_HOME%\bin\cassandra.batをダブルクリック。あら簡単。

ログやデータはデフォルトで%CASSANDRA_HOME%\lib\var以下にできる模様。(なんか変なドライブまでできとる。。。)

クライアント(CLI)接続

%CASSANDRA_HOME%\bin\cassandra-cli.batをダブルクリック。

connectを実行した後はREADME通り。

cassandra> connect localhost/9160
Connected to localhost/9160
cassandra> set Keyspace1.Standard1['jsmith']['first'] = 'John'
Value inserted.
cassandra> set Keyspace1.Standard1['jsmith']['last'] = 'Smith'
Value inserted.
cassandra> set Keyspace1.Standard1['jsmith']['age'] = '42'
Value inserted.
cassandra> get Keyspace1.Standard1['jsmith']
=> (column=last, value=Smith, timestamp=1267619133099)
=> (column=first, value=John, timestamp=1267619123162)
=> (column=age, value=42, timestamp=1267619142661)
Returned 3 results.

Created at : 2010-03-03 21:26:36   Updated at : 2010-03-03 22:32:06
Category : Middleware::NoSQL::Cassandra