code: public static ThriftClient build(String host, int port, String keyspace) throws TException {
          TTransport transport = new TFramedTransport(new TSocket(host, port));
          TProtocol protocol = new TBinaryProtocol(transport);
          ThriftClient client = new ThriftClient(protocol);
          transport.open();
          if (keyspace != null) {
              client.set_keyspace(keyspace);
          }
          return client;
      }
docs: Returns a new client for the specified host, setting the specified keyspace.
  
  @param host     the Cassandra host address.
  @param port     the Cassandra host RPC port.
  @param keyspace the name of the Cassandra keyspace to set.
  @return a new client for the specified host, setting the specified keyspace.
  @throws TException if there is any problem with the {@code set_keyspace} call.