You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Cyril Scetbon <cy...@free.fr> on 2014/02/13 17:22:21 UTC

TimedOutException in Java but not in cqlsh

Hi,

I get a weird issue with cassandra 1.2.13. As written in the subject, a query executed by class CqlPagingRecordReader raises a TimedOutException exception in Java but I don't have any error when I use it with cqlsh. What's the difference between those 2 ways ? Does cqlsh bypass some configuration compared to Java ?

You can find my sample code at http://pastebin.com/vbAFyAys (don't take care of the way it's coded cause it's just a sample code). FYI, I can't reproduce it on another cluster. Here is the output of the 2 different ways (java and cqlsh) I used http://pastebin.com/umMNXJRw

Thanks
-- 
Cyril SCETBON


Re: TimedOutException in Java but not in cqlsh

Posted by Cyril Scetbon <cy...@free.fr>.
Okay, so the matter is that when :

- I'm in multi-datacenters configuration (with endpoint_snitch: PropertyFileSnitch)
- I create a keyspace with strategy SimpleStrategy
- I create a column family in this keyspace and select from it with CONSISTENCY LOCAL_ONE

I get a rpc_timeout (A developer did all these actions :D ) I understand that SimpleStrategy can't work with multi-datacenters, but shouldn't we have an error raised when using this type of consistency ?

Another question is why can we still create SimpleStrategy keyspaces with PropertyFileSnitch enabled ?

-- 
Cyril SCETBON

On 14 Feb 2014, at 11:04, Cyril Scetbon <cy...@free.fr> wrote:

> Hi,
> 
> Good advice. I found earlier in the morning that it's related to consistency LOCAL_ONE. I'll check later if it should raise an error in some cases.
> 
> Thanks
> -- 
> Cyril SCETBON
> 
> On 14 Feb 2014, at 10:12, Vivek Mishra <mi...@gmail.com> wrote:
> 
>> Check for consisteny level and socket timeout setting on client side.
>> 
>> -Vivek
>> 
>> 
>> On Fri, Feb 14, 2014 at 2:36 PM, Cyril Scetbon <cy...@free.fr> wrote:
>> After a few tests, it does not depend on the query. Whatever cql3 query I do, I always get the same exception. If someone sees something ...
>> --
>> Cyril SCETBON
>> 
>> On 13 Feb 2014, at 17:22, Cyril Scetbon <cy...@free.fr> wrote:
>> 
>> > Hi,
>> >
>> > I get a weird issue with cassandra 1.2.13. As written in the subject, a query executed by class CqlPagingRecordReader raises a TimedOutException exception in Java but I don't have any error when I use it with cqlsh. What's the difference between those 2 ways ? Does cqlsh bypass some configuration compared to Java ?
>> >
>> > You can find my sample code at http://pastebin.com/vbAFyAys (don't take care of the way it's coded cause it's just a sample code). FYI, I can't reproduce it on another cluster. Here is the output of the 2 different ways (java and cqlsh) I used http://pastebin.com/umMNXJRw
>> >
>> > Thanks
>> > --
>> > Cyril SCETBON
>> >
>> 
>> 
> 


Re: TimedOutException in Java but not in cqlsh

Posted by Cyril Scetbon <cy...@free.fr>.
Hi,

Good advice. I found earlier in the morning that it's related to consistency LOCAL_ONE. I'll check later if it should raise an error in some cases.

Thanks
-- 
Cyril SCETBON

On 14 Feb 2014, at 10:12, Vivek Mishra <mi...@gmail.com> wrote:

> Check for consisteny level and socket timeout setting on client side.
> 
> -Vivek
> 
> 
> On Fri, Feb 14, 2014 at 2:36 PM, Cyril Scetbon <cy...@free.fr> wrote:
> After a few tests, it does not depend on the query. Whatever cql3 query I do, I always get the same exception. If someone sees something ...
> --
> Cyril SCETBON
> 
> On 13 Feb 2014, at 17:22, Cyril Scetbon <cy...@free.fr> wrote:
> 
> > Hi,
> >
> > I get a weird issue with cassandra 1.2.13. As written in the subject, a query executed by class CqlPagingRecordReader raises a TimedOutException exception in Java but I don't have any error when I use it with cqlsh. What's the difference between those 2 ways ? Does cqlsh bypass some configuration compared to Java ?
> >
> > You can find my sample code at http://pastebin.com/vbAFyAys (don't take care of the way it's coded cause it's just a sample code). FYI, I can't reproduce it on another cluster. Here is the output of the 2 different ways (java and cqlsh) I used http://pastebin.com/umMNXJRw
> >
> > Thanks
> > --
> > Cyril SCETBON
> >
> 
> 


Re: TimedOutException in Java but not in cqlsh

Posted by Vivek Mishra <mi...@gmail.com>.
Check for consisteny level and socket timeout setting on client side.

-Vivek


On Fri, Feb 14, 2014 at 2:36 PM, Cyril Scetbon <cy...@free.fr>wrote:

> After a few tests, it does not depend on the query. Whatever cql3 query I
> do, I always get the same exception. If someone sees something ...
> --
> Cyril SCETBON
>
> On 13 Feb 2014, at 17:22, Cyril Scetbon <cy...@free.fr> wrote:
>
> > Hi,
> >
> > I get a weird issue with cassandra 1.2.13. As written in the subject, a
> query executed by class CqlPagingRecordReader raises a TimedOutException
> exception in Java but I don't have any error when I use it with cqlsh.
> What's the difference between those 2 ways ? Does cqlsh bypass some
> configuration compared to Java ?
> >
> > You can find my sample code at http://pastebin.com/vbAFyAys (don't take
> care of the way it's coded cause it's just a sample code). FYI, I can't
> reproduce it on another cluster. Here is the output of the 2 different ways
> (java and cqlsh) I used http://pastebin.com/umMNXJRw
> >
> > Thanks
> > --
> > Cyril SCETBON
> >
>
>

Re: TimedOutException in Java but not in cqlsh

Posted by Cyril Scetbon <cy...@free.fr>.
After a few tests, it does not depend on the query. Whatever cql3 query I do, I always get the same exception. If someone sees something ...
-- 
Cyril SCETBON

On 13 Feb 2014, at 17:22, Cyril Scetbon <cy...@free.fr> wrote:

> Hi,
> 
> I get a weird issue with cassandra 1.2.13. As written in the subject, a query executed by class CqlPagingRecordReader raises a TimedOutException exception in Java but I don't have any error when I use it with cqlsh. What's the difference between those 2 ways ? Does cqlsh bypass some configuration compared to Java ?
> 
> You can find my sample code at http://pastebin.com/vbAFyAys (don't take care of the way it's coded cause it's just a sample code). FYI, I can't reproduce it on another cluster. Here is the output of the 2 different ways (java and cqlsh) I used http://pastebin.com/umMNXJRw
> 
> Thanks
> -- 
> Cyril SCETBON
>