cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Canillas <javier.canil...@gmail.com>
Subject Re: Timeout
Date Sat, 19 Feb 2011 01:39:54 GMT
Why don't you post some details about your Cassandra Cluster, version,
information about the keyspace you are creating (for example which is the
replication factor within)? It might be of help.

Besides, I don't fully understand your code. First you drop KEYSPACE, then
create it again with a column Family CF_NAME, then you add a Column to
CF_NAME's column definitions (Am I right?) and finally you display
KEYSPACE's information.

After that, you create your own structure by passing again another object.
What does actually do that method "createKeyspace()"?

If you can add more details, it might be of help.

On Fri, Feb 18, 2011 at 10:02 PM, mcasandra <mohitanchlia@gmail.com> wrote:

>
> I have this below code and what I see is that when I run this below code
> there is a timeout that occurs when I try to insert a column. But when I
> comment out first 4 lines (drop to display) then it works without any
> issues. I am trying to understand why. If required I can sleep and then
> insert. Is it because it's getting insert too fast before Cassandra is able
> to persist keyspace info accross nodes?
>
>
>
>
>        hUtil.dropKeyspace(c, KEYSPACE); //drop on the server
>             hUtil.createKeyspace(c, KEYSPACE, CF_NAME); //Create on the
> server
>        hUtil.addColumn(c, KEYSPACE, CF_NAME); // Add on the server
>        hUtil.display(c, KEYSPACE); //Display keyspace info
>
>        ExampleDaoV2 ed = new ExampleDaoV2(createKeyspace(KEYSPACE, c));
>        ed.insert("key1", "value2", StringSerializer.get());
>        System.out.println(ed.get("key1", StringSerializer.get()));
>
>
> Caused by: TimedOutException()
>        at
>
> org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16493)
>        at
>
> org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916)
>        at
>
> org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890)
>        at
>
> me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:93)
>        ... 14 more
>
> --
> View this message in context:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Timeout-tp6042052p6042052.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at
> Nabble.com.
>

Mime
View raw message