Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cassandra stuff
cassandra-cli
[default@unknown] CREATE KEYSPACE ankusa_test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1};
9c65cd2b-93bf-3fe0-bb15-a5472c18159c
Waiting for schema agreement...
... schemas agree across the cluster
rake test_cassandra
/home/jjones/.rvm/rubies/ruby-2.1.2/bin/ruby -I"lib:lib:." -I"/home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/rake-10.3.2/lib" "/home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/hasher_test.rb" "test/cassandra_classifier_test.rb"
Run options:
# Running tests:
/home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/cassandra-0.23.0/vendor/0.7/gen-rb/cassandra_types.rb:674:in `validate': Required field replication_factor is unset! (Thrift::ProtocolException)
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift-0.8.0/lib/thrift/client.rb:48:in `read'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift-0.8.0/lib/thrift/client.rb:48:in `receive_message'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/cassandra-0.23.0/vendor/0.7/gen-rb/cassandra.rb:266:in `recv_describe_keyspaces'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/cassandra-0.23.0/vendor/0.7/gen-rb/cassandra.rb:258:in `describe_keyspaces'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:in `block in handled_proxy'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:146:in `ensure_socket_alignment'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:in `handled_proxy'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:53:in `describe_keyspaces'
from /home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/cassandra-0.23.0/lib/cassandra/cassandra.rb:157:in `keyspaces'
from /home/jjones/Projects/ankusa/lib/ankusa/cassandra_storage.rb:64:in `init_tables'
from /home/jjones/Projects/ankusa/lib/ankusa/cassandra_storage.rb:27:in `initialize'
from /home/jjones/Projects/ankusa/test/cassandra_classifier_test.rb:6:in `new'
from /home/jjones/Projects/ankusa/test/cassandra_classifier_test.rb:6:in `initialize'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:934:in `new'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:934:in `block in _run_suite'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:663:in `block in _run_suites'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:661:in `each'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:661:in `_run_suites'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:27:in `run'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:780:in `run'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:372:in `block (2 levels) in autorun'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:33:in `run_once'
from /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:371:in `block in autorun'
describe ankusa_test;
ankusa_test:
Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
Durable Writes: true
Options: [replication_factor:1]
Column Families:
@rurounijones

This comment has been minimized.

Copy link
Owner Author

commented May 21, 2014

library README says:

Prior to using the Cassandra storage you will need to run the following command from the cassandra-cli: “create keyspace ankusa with replication_factor = 1”. This should be fixed with a new release candidate for Cassandra.

but based on http://stackoverflow.com/questions/14409887/cassandra-illegalargumentexception-creating-keyspace
it should be

CREATE KEYSPACE ankusa_test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.