Impetus / kundera

A JPA 2.1 compliant Polyglot Object-Datastore Mapping Library for NoSQL Datastores.Please subscribe to:
http://groups.google.com/group/kundera-discuss/subscribe
Apache License 2.0
903 stars 233 forks source link

Kundera Timeout Exception #692

Open casslover opened 9 years ago

casslover commented 9 years ago

Hello ! I'm using Kundera Cassandra for my application. When i inserted 10.000 rows. Kundera give me error :

com.impetus.kundera.persistence.context.FlushManager: Caught exception during rollback, Caused by:
javax.persistence.PersistenceException: com.impetus.kundera.KunderaException: TimedOutException(acknowledged_by:0)
    at com.impetus.client.cassandra.CassandraClientBase.executeCQLQuery(CassandraClientBase.java:1719)  
Caused by: TimedOutException(acknowledged_by:0)
    at org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result$execute_cql3_query_resultStandardScheme.read(Cassandra.java:50315)

I'm having 3 nodes 16GB RAM with 12 cores for each. I'm using this persistence.xml for my application configuration look like :

<properties>
      <property name="jboss.as.jpa.managed" value="false"/>
      <property name="kundera.nodes" value="localhost"/>
      <property name="kundera.port" value="9160"/>
      <property name="kundera.keyspace" value="mydata"/>
      <property name="kundera.dialect" value="cassandra"/>
      <property name="kundera.ddl.auto.prepare" value="update"/>
      <property name="kundera.client" value="thrift"/>
      <property name="kundera.client.lookup.class" value="com.impetus.client.cassandra.thrift.ThriftClientFactory"/>
      <property name="kundera.cache.provider.class" value="com.impetus.kundera.cache.ehcache.EhCacheProvider"/>
     <property name="kundera.client.property" value="kunderaCounter.xml"/>
     <property name="hibernate.show_sql" value="true"/>
      <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
</properties>

Can anyone give me advance about my problem? Thank in advance!

mevivs commented 9 years ago

@casslover few things:

  1. You should configure multiple host with Kundera and define load balancing policy https://github.com/impetus-opensource/Kundera/wiki/Cassandra-Specific-Features#cql-version-setup
  2. Configure connection pool with Kundera's persistence.xml. https://github.com/impetus-opensource/Kundera/blob/trunk/test/benchmark/ycsb/src/main/resources/META-INF/persistence.xml#L38
  3. Check for consistency level per write operation.
  4. Check various timeout_in_ms in cassandra.yaml

HTH, -Vivek

casslover commented 9 years ago

Thanks you. I will try. When will Kundera support Map/Reduce?

mevivs commented 9 years ago

@casslover Can you mention your map-reduce use case you looking to sort out with Kundera?

I guess, a mapper/reducer can act/inject Kundera powered DAOs as an alternative.

Later, -Vivek