I am inserting data in cassandra from a csv file using java driver.But after some inserts it throws NoHostAvailableException:java 65 :All host(s) tried for query failed (no host was tried). I am having cassandra on client machine (singlenode).Cassandra services are still running on client machine. Thanks in advance.I am a newbie.
Asked
Active
Viewed 199 times
0
-
@user3819405 Anything interesting from the server-side cassandra logs? Also how much memory have you given Cassandra / your app that is carrying out the inserts. – Lyuben Todorov Oct 02 '14 at 01:13
-
1Do you execute one statement per row to insert, or use batch statements? – Olivier Michallat Oct 02 '14 at 09:53
-
@OlivierMichallat Yes I also tried creating batch statement.But the result is same. – user3819405 Oct 15 '14 at 05:59
2 Answers
0
Here's some best practices for bulk ingestions using the java driver:
http://lostechies.com/ryansvihla/2014/08/28/cassandra-batch-loading-without-the-batch-keyword/

phact
- 7,305
- 23
- 27
0
I got this problem solved by using executeasync method present in the java driver.

Russia Must Remove Putin
- 374,368
- 89
- 403
- 331

user3819405
- 35
- 7