priam¶ ↑
‘priam’ is a command-base client for Cassandra.
Supported Ruby versions and implementations¶ ↑
bunnish should work identically on:
-
Ruby 1.9.3+
-
Ruby 1.9.2+
-
Ruby 1.8.7+
Install¶ ↑
You can install priam by gem.
gem install priam
Usage¶ ↑
insert value:
$ cat input.txt key1 val2 key2 val2 $ cat input.txt | priam insert -h cassandra-server -p 9160 --keyspace TestKS --column-family TestCF --verbose [2012-12-12 10:16:46](INFO) insert into cassandra://cassandra-server:9160/TestKS/TestCF [2012-12-12 10:16:46](INFO) inserted 2 columns into cassandra://cassandra-server:9160/TestKS/TestCF
insert json:
$ cat input.txt key1 {"d":"val2"} key2 {"d":"val2"} $ cat input.txt | priam insert -h cassandra-server -p 9160 --keyspace TestKS --column-family TestCF --json --verbose [2012-12-12 10:16:46](INFO) insert into cassandra://cassandra-server:9160/TestKS/TestCF [2012-12-12 10:16:46](INFO) inserted 2 columns into cassandra://cassandra-server:9160/TestKS/TestCF
get record in json:
$ cat keys.txt key1 key2 $ cat keys.txt | priam get -h cassandra-server -p 9160 --keyspace TestKS --column-family TestCF --verbose {"d":"val1"} {"d":"val2"} [2012-12-12 10:17:54](INFO) GET [key1,key2]
get column value:
$ cat keys.txt | priam get -h cassandra-server -p 9160 --keyspace TestKS --column-family TestCF --name d --verbose val1 val2 [2012-12-12 10:29:42](INFO) GET [key1,key2]
delete key&value:
$ cat keys.txt | priam delete -h cassandra-server -p 9160 --keyspace TestKS --column-family TestCF --verbose [2012-12-12 10:31:02](INFO) removed column 'key1' [2012-12-12 10:31:02](INFO) removed column 'key2' [2012-12-12 10:31:02](INFO) removed 2 columns from cassandra://cassandra-server:9160/TestKS/TestCF
Contributing to priam¶ ↑
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.
-
Fork the project.
-
Start a feature/bugfix branch.
-
Commit and push until you are happy with your contribution.
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright¶ ↑
Copyright © 2012 Kenji Hara. See LICENSE.txt for further details.