// random node selection for fake load balancing
String currentNode = nodes[Stress.randomizer.nextInt(nodes.length)];
TSocket socket = new TSocket(currentNode, port);
TTransport transport = transportFactory.getTransport(socket);
CassandraClient client = new CassandraClient(new TBinaryProtocol(transport));
try
{
if(!transport.isOpen())
transport.open();
if (enable_cql)
client.set_cql_version(cqlVersion);
if (setKeyspace)
{
client.set_keyspace("Keyspace1");
}
}
catch (InvalidRequestException e)
{
throw new RuntimeException(e.getWhy());