alter KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 2};
http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt
Вопрос
I am trying to increase my replication factor in cassandra because it is neccesary for security related reasons according to:
When I do the command:
ALTER KEYSPACE "system_auth" WITH REPLICATION { 'class' : 'SimpleStrategy', 'replication_factor' : 2};
I get the error:
Bad Request: line 1:46 missing '=' at {
Does someone know why this is? I am confused about this
Решение
alter KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 2};
http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt
Другие советы
I was receiving similar errors, and here are the steps I went through to get things working for me.
A little about my setup: running four Cassandra servers in AWS. They're named (unoriginally) cass1
through cass4
.
cassandra.yaml
on cass1
. I set authenticator: PasswordAuthenticator
and authorizer: CassandraAuthorizer
.cass1
.cqlsh -u cassandra -p cassandra
ALTER TABLE
than @mikhail-stepura recommended. I used: alter KEYSPACE system_auth WITH replication = { 'class' : 'NetworkTopologyStrategy', 'us-east' : 4};
cass2
through cass4
. I would get one of two error messages: either
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)})
or Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, 'ECONNREFUSED')})
cassandra.yaml
on cass2
through cass4
, and restarted Cassandra on each server.