Skip to content

Commit

Permalink
Merge pull request #611 from jbojar/master
Browse files Browse the repository at this point in the history
Patch for issue #584: operateWithFailover fails against c* 1.2.1 when authentication is enabled
  • Loading branch information
zznate committed Apr 17, 2013
2 parents d862e95 + 800cc65 commit 73d2820
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ public void operateWithFailover(Operation<?> op) throws HectorException {
// TODO how to 'timeout' on this op when underlying pool is exhausted
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.getCassandra().login(new AuthenticationRequest(op.credentials));
client.setAuthenticated(op.credentials);
}
Cassandra.Client c = client.getCassandra(op.keyspaceName);

op.executeAndSetResult(c, pool.getCassandraHost());
success = true;
Expand Down

0 comments on commit 73d2820

Please sign in to comment.