Hello guys. Suddenly I've met a little problem with authentication.
There is the following code in HConnectionManager class (operateWithFailover() method):
pool = getClientFromLBPolicy(excludeHosts);
client = pool.borrowClient();
Cassandra.Client c = client.getCassandra(op.keyspaceName);
// Keyspace can be null for some system_* api calls
if ( op.credentials != null && !op.credentials.isEmpty() && !client.isAlreadyAuthenticated(op.credentials)) {
c.login(new AuthenticationRequest(op.credentials));
client.setAuthenticated(op.credentials);
}
So just created cassandra client is tried to bound with keyspace. And only after that the client is tried to log in.
My problem is so that if there is authentication needed then exception is generated in client.getCassandra(op.keyspaceName).
Is there any workaround for this situation?