java - Cassandra Read TimeOut during paging query -
i have 2 cassandra node replica_factor=2. trying run select().all() code , used setfetchsize(50000). when start iterating result after time throw readtimeoutexception cassandra timeout during read query @ consistency 1 (1 responses required 0 replica responded). 1 please give me suggestion?
i creating cluster using below code
poolingoptions poolingoptions = new poolingoptions(); poolingoptions.setcoreconnectionsperhost(hostdistance.local, 52) .setmaxconnectionsperhost(hostdistance.local, 80) .setmaxrequestsperconnection(hostdistance.local, 500); socketoptions socketoption = new socketoptions(); socketoption.setreadtimeoutmillis(600000) .setreceivebuffersize(1024*512) .setsendbuffersize(1024*512) .setkeepalive(true).setconnecttimeoutmillis(1800000); cluster = cluster.builder() .addcontactpoints(cassandrahosts.get("host_1"), cassandrahosts.get("host_2")) .withpoolingoptions(poolingoptions) .withport(cassandraport) .withsocketoptions(socketoption) .withloadbalancingpolicy(new tokenawarepolicy(new dcawareroundrobinpolicy())).build(); session session = cluster.connect(cassandradb);
- cassandra version: 2.2.1
- java 7
- is there other way execute select query without read time out exception
Comments
Post a Comment