Skip to content

Commit

Permalink
Patch for issue hector-client#584 in 1.1-3 branch: operateWithFailove…
Browse files Browse the repository at this point in the history
…r fails against c* 1.2.1 when authentication is enabled
  • Loading branch information
jbojar committed Apr 17, 2013
1 parent 396d855 commit c8857ec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.hectorclient</groupId>
<artifactId>hector</artifactId>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
</parent>

<artifactId>hector-core</artifactId>
Expand Down
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
6 changes: 3 additions & 3 deletions object-mapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.hectorclient</groupId>
<artifactId>hector</artifactId>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
</parent>
<artifactId>hector-object-mapper</artifactId>
<name>hector-object-mapper</name>
Expand Down Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>org.hectorclient</groupId>
<artifactId>hector-core</artifactId>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand All @@ -61,7 +61,7 @@
<dependency>
<groupId>org.hectorclient</groupId>
<artifactId>hector-test</artifactId>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<groupId>org.hectorclient</groupId>
<artifactId>hector</artifactId>
<packaging>pom</packaging>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
<name>hector</name>
<description>Cassandra Java Client Library</description>
<url>http://github.com/hector-client/hector</url>
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.hectorclient</groupId>
<artifactId>hector</artifactId>
<version>1.1-3</version>
<version>1.1-3-agora-1</version>
</parent>
<artifactId>hector-test</artifactId>
<packaging>jar</packaging>
Expand Down

0 comments on commit c8857ec

Please sign in to comment.