cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcasandra <mohitanch...@gmail.com>
Subject Timeout
Date Sat, 19 Feb 2011 01:02:39 GMT

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