From c8857ec665752a58d9cbc296752f6c3f7b8b7eab Mon Sep 17 00:00:00 2001 From: Jarek Bojar Date: Wed, 17 Apr 2013 14:42:03 +0200 Subject: [PATCH] Patch for issue #584 in 1.1-3 branch: operateWithFailover fails against c* 1.2.1 when authentication is enabled --- core/pom.xml | 2 +- .../cassandra/connection/HConnectionManager.java | 4 ++-- object-mapper/pom.xml | 6 +++--- pom.xml | 2 +- test/pom.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index a4e840a3a..6fd18d87c 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ org.hectorclient hector - 1.1-3 + 1.1-3-agora-1 hector-core diff --git a/core/src/main/java/me/prettyprint/cassandra/connection/HConnectionManager.java b/core/src/main/java/me/prettyprint/cassandra/connection/HConnectionManager.java index 9764a01e1..5b235dbf1 100644 --- a/core/src/main/java/me/prettyprint/cassandra/connection/HConnectionManager.java +++ b/core/src/main/java/me/prettyprint/cassandra/connection/HConnectionManager.java @@ -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; diff --git a/object-mapper/pom.xml b/object-mapper/pom.xml index d819451b9..6f963fd60 100644 --- a/object-mapper/pom.xml +++ b/object-mapper/pom.xml @@ -4,7 +4,7 @@ org.hectorclient hector - 1.1-3 + 1.1-3-agora-1 hector-object-mapper hector-object-mapper @@ -50,7 +50,7 @@ org.hectorclient hector-core - 1.1-3 + 1.1-3-agora-1 log4j @@ -61,7 +61,7 @@ org.hectorclient hector-test - 1.1-3 + 1.1-3-agora-1 test diff --git a/pom.xml b/pom.xml index 9c4362e2d..4a0076350 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.hectorclient hector pom - 1.1-3 + 1.1-3-agora-1 hector Cassandra Java Client Library http://github.com/hector-client/hector diff --git a/test/pom.xml b/test/pom.xml index 09dd6848b..9d30af915 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -3,7 +3,7 @@ org.hectorclient hector - 1.1-3 + 1.1-3-agora-1 hector-test jar