You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Atul Gosain <at...@gmail.com> on 2010/06/27 12:53:15 UTC

Hector Client Failover errors

I am trying to insert the data using hector client. Using only one host in
the pool ie. localhost. like as follows
            CassandraClientPool pool =
CassandraClientPoolFactory.INSTANCE.get();
            client = pool.borrowClient("localhost", 9160);
            global = client.getKeyspace(keyspace, ConsistencyLevel.ONE);


After some(5-6) iterations of insertions of data (every 5 min insertion of
about 40 MB of data), the program starts emitting this

10/06/27 09:55:28 WARN service.FailoverOperator: Got a TTransportException
from localhost. Num of retries: 1
10/06/27 09:55:28 INFO service.FailoverOperator: Skipping to next host.
Current host is: localhost
10/06/27 09:55:28 INFO service.FailoverOperator: Skipped host. New host is:
localhost

I couldnt understand the reason for this, when im using only device in the
pool. If i remove the ConsistencyLevel.ONE, then the error starts from the
first iteration itself.

The same program through Thrift runs without any problems. Actually, i just
modified the thrift program and replaced the calls to thrift api to
corresponding Hector calls.

Thanks
Atul

Re: Hector Client Failover errors

Posted by Ran Tavory <ra...@gmail.com>.
ttransport exception usually happens when the server cannot respond or
there's a network error.
Can you send more context to from your code?
More context from the exception?

Is the insertion rate about the same in the thrift or hector versions? If
insertion with hector is faster than thrift (connection pooling) then maybe
your server is freaking out.

On Sun, Jun 27, 2010 at 1:53 PM, Atul Gosain <at...@gmail.com> wrote:

> I am trying to insert the data using hector client. Using only one host in
> the pool ie. localhost. like as follows
>             CassandraClientPool pool =
> CassandraClientPoolFactory.INSTANCE.get();
>             client = pool.borrowClient("localhost", 9160);
>             global = client.getKeyspace(keyspace, ConsistencyLevel.ONE);
>
>
> After some(5-6) iterations of insertions of data (every 5 min insertion of
> about 40 MB of data), the program starts emitting this
>
> 10/06/27 09:55:28 WARN service.FailoverOperator: Got a TTransportException
> from localhost. Num of retries: 1
> 10/06/27 09:55:28 INFO service.FailoverOperator: Skipping to next host.
> Current host is: localhost
> 10/06/27 09:55:28 INFO service.FailoverOperator: Skipped host. New host is:
> localhost
>
> I couldnt understand the reason for this, when im using only device in the
> pool. If i remove the ConsistencyLevel.ONE, then the error starts from the
> first iteration itself.
>
> The same program through Thrift runs without any problems. Actually, i just
> modified the thrift program and replaced the calls to thrift api to
> corresponding Hector calls.
>
> Thanks
> Atul
>