PreparedStatement ps = session.prepare("SELECT * FROM mcf WHERE key = :key AND column1 >= :start AND column1 <= :end");
ps.enableTracing();
ResultSetFuture future = session.executeAsync(ps.bind("mykey", startTs, endTs));
...
ResultSet rs = null;
try {
rs = future.getUninterruptibly();
List<Row> rows = rs.all();
// process them
} catch(ReadTimeoutException rte) {
// log queries getting timeout
log.debug("timeout on queryId: " + rs.getExectionInfo().getQueryTrace().getTraceId());
// ^^ but rs is null
} catch(Exception ex) {
....
}
--
Olivier Michallat
Driver & tools engineer, DataStax
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.
--
Olivier Michallat
Driver & tools engineer, DataStax
Olivier,Thanks for responding. This is what I'm afraid of. :-( Yes, we could be tracing a lot of queries. Finding the ones that are timing out could be looking for a needle in the haystack.We use default timeouts of 5s in cassandra.yaml. I am wary of increasing this. Do you think I should? How do I resolve these query timeouts ?Thanks,-shinta