I am trying to read data present in a specific cassandra (4) node, using Datastax driver version 4.13. I have read this post, which supposedly works for driver versions 3.x
I have modified my code as best I can for driver version 4.x. The operative part of the code looks like
BoundStatement bs= psGetAllOptimizedModule.bind(imei,year,month,startDate,endDate)
.setTracing(true)
.setNode(localNode).setConsistencyLevel(ConsistencyLevel.LOCAL_ONE).setPageSize(pageSize);
Instant start=Instant.now();
ResultSet rs = session.execute(bs);
While the query is indeed directed to the specified node, the node then is sometimes forwarding requests to other nodes, even though the data is present on the specified node.
I wanted to check if this is at all possible in cassandra, and if so, what I need to do differently.
Update: As requested, the information asked for has been added to a pastebin here, as its too long to add to the question.