You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Batranut Bogdan <ba...@yahoo.com> on 2015/01/12 18:58:34 UTC
Datastax Cassandra Java Driver executeAsynch question.
Hello all,
In my implementation of the FutureCallBack<> interface in the onSuccess method, I put Thread.currentThread.getName(). What I saw was that there is a ThreadPool... That is all fine, but seems to me that the pool does not have that many threads. About 10 from my observations - I did not bother to get the exact number. Why? Well because when I query cassandra I have a list of about 6000 cf keys. I traverse the list and executeAsynch a prepared statement for each of these. I have seen that during the execution the driver is waiting for free threads to continue if all the threads in the pool are waiting for response from C*.
How can I increase the number of threads that the driver uses to query Cassandra?
Re: Datastax Cassandra Java Driver executeAsynch question.
Posted by Alex Popescu <al...@datastax.com>.
Hi Bogdan,
This question would be better on the specific driver's mailing list.
Assuming you are using the Java driver the mailing list is [1]. As for your
question look into PoolingOptions [2] that you pass when configuring the
Cluster instance.
[1]:
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
[2]:
http://www.datastax.com/drivers/java/2.1/com/datastax/driver/core/PoolingOptions.html
On Mon, Jan 12, 2015 at 9:58 AM, Batranut Bogdan <ba...@yahoo.com> wrote:
> Hello all,
>
>
> In my implementation of the FutureCallBack<> interface in the onSuccess
> method, I put Thread.currentThread.getName(). What I saw was that there is
> a ThreadPool... That is all fine, but seems to me that the pool does not
> have that many threads. About 10 from my observations - I did not bother to
> get the exact number. Why? Well because when I query cassandra I have a
> list of about 6000 cf keys. I traverse the list and executeAsynch a
> prepared statement for each of these. I have seen that during the execution
> the driver is waiting for free threads to continue if all the threads in
> the pool are waiting for response from C*.
>
> How can I increase the number of threads that the driver uses to query
> Cassandra?
>
>
>
--
[:>-a)
Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru