小编SDt*_*SDt的帖子

NoNodeAvailableException: 没有可用的节点来执行查询

I am not using Elasticssearch. I am trying to perform some database operations in cassandra using CQL. I am using threads. While running the code I am always getting the exception in thread after a while : com.datastax.oss.driver.api.core.NoNodeAvailableException: No node was available to execute the query.

I have tested with even one thread. The error is still there. Here is my code :

InetAddress addrOne = InetAddress.getByName("52.15.195.41");
InetSocketAddress addrSocOne = new InetSocketAddress(addrOne,9042);
CqlSession sessionOne = CqlSession.builder().addContactPoint(addrSocOne).withLocalDatacenter("us-east-2").withKeyspace("test").build();

while(counter <= 100)
{ …
Run Code Online (Sandbox Code Playgroud)

java multithreading cassandra datastax

9
推荐指数
2
解决办法
6866
查看次数

标签 统计

cassandra ×1

datastax ×1

java ×1

multithreading ×1