Netflix / astyanax

Cassandra Java Client
Apache License 2.0
1.04k stars 357 forks source link

Cassandra Credentails #627

Open pavanshetty05 opened 7 years ago

pavanshetty05 commented 7 years ago

In below code where we need to set the Casandra credentials ? Do you have any property file for the same ?

AstyanaxContext context = new AstyanaxContext.Builder() .forCluster("ClusterName") .forKeyspace("KeyspaceName") .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
.setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE) ) .withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl("MyConnectionPool") .setPort(9160) .setMaxConnsPerHost(1) .setSeeds("127.0.0.1:9160") ) .withConnectionPoolMonitor(new CountingConnectionPoolMonitor()) .buildKeyspace(ThriftFamilyFactory.getInstance());