我cassandra-cli -h localhost用来创建键空间。
我试过这个命令:create keyspace reddit with strategy_options = [{replication_factor:1}];和这个:create keyspace reddit with strategy_options = {replication_factor:1};,但我得到的是这个:
org.apache.thrift.transport.TTransportException
我在 ArchLinux(由 AUR 构建)上尝试了 Cassandra 1.1.6 和 1.2.2。(我正在运行 Cassandra systemctl start cassandra)。
另外,当我尝试use reddit; 在创建键空间之前它返回时Keyspace 'reddit' not found.,但在尝试创建键空间之后它返回Login failure. Did you specify 'keyspace', 'username' and 'password'?。
编辑:忘了提,但create keyspace test;效果很好,但是当我使用 replication_factor 创建键空间时,它会引发异常。