Skip to content

Commit

Permalink
Merge branch 'cassandra-2.1' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Lebresne committed Mar 4, 2014
2 parents 21c7252 + ce94010 commit 87318ef
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file not shown.
Binary file added tools/lib/cassandra-driver-core-2.0.0.jar
Binary file not shown.
Expand Up @@ -104,7 +104,7 @@ public Cassandra.Client getRawThriftClient(String host, boolean setKeyspace)
client.set_cql_version(mode.cqlVersion.connectVersion);

if (setKeyspace)
client.set_keyspace("Keyspace1");
client.set_keyspace(schema.keyspace);
}
catch (InvalidRequestException e)
{
Expand All @@ -126,7 +126,7 @@ public SimpleClient getSimpleNativeClient()
String currentNode = node.randomNode();
SimpleClient client = new SimpleClient(currentNode, port.nativePort);
client.connect(false);
client.execute("USE \"Keyspace1\";", org.apache.cassandra.db.ConsistencyLevel.ONE);
client.execute("USE \"" + schema.keyspace + "\";", org.apache.cassandra.db.ConsistencyLevel.ONE);
return client;
}
catch (Exception e)
Expand All @@ -153,7 +153,7 @@ public JavaDriverClient getJavaDriverClient()
EncryptionOptions.ClientEncryptionOptions encOptions = transport.getEncryptionOptions();
JavaDriverClient c = new JavaDriverClient(currentNode, port.nativePort, encOptions);
c.connect(mode.compression());
c.execute("USE \"Keyspace1\";", org.apache.cassandra.db.ConsistencyLevel.ONE);
c.execute("USE \"" + schema.keyspace + "\";", org.apache.cassandra.db.ConsistencyLevel.ONE);
return client = c;
}
}
Expand Down
Expand Up @@ -107,7 +107,7 @@ void prepare(Integer id, boolean cql3) throws TException

private Client get(ByteBuffer pk)
{
Set<Host> hosts = metadata.getReplicas(keyspace, pk);
Set<Host> hosts = metadata.getReplicas(metadata.quote(keyspace), pk);
int count = roundrobin.incrementAndGet() % hosts.size();
if (count < 0)
count = -count;
Expand Down

0 comments on commit 87318ef

Please sign in to comment.