private static AstyanaxContext<Keyspace> connect(String host, int port, String keyspace, int threads, NodeDiscoveryType discovery) {
AstyanaxContext<Keyspace> context = new AstyanaxContext.Builder()
.forKeyspace(keyspace)
.withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
.setDiscoveryType(discovery)
.setRetryPolicy(new RetryNTimes(10)))
.withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl(host + ":" + keyspace)
.setMaxConns(threads * 2)
.setSeeds(host)
.setPort(port)