kundera

OneToMany with @EmbeddedId and kundera

半城伤御伤魂 提交于 2021-01-27 13:42:00
问题 I have two class and I want to use OneToMany relation with EmbeddedId (Im working with kundera framework) my sensor entity class: public class SensorEntitie implements Serializable { @EmbeddedId private CompoundKey key; @Column private float temperature; @Column private float pressure; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER) @JoinColumn(name="what I should to put here") private List<PieceEntitie> pieces; } @Embeddable public class CompoundKey { @Column private

com.impetus.kundera.KunderaException: org.apache.thrift.transport.TTransportException: Read a negative frame size

╄→尐↘猪︶ㄣ 提交于 2020-01-25 01:35:26
问题 I am trying load testing by inserting 60k rows in cassandra and after few thousand i run into below error com.impetus.kundera.KunderaException: org.apache.thrift.transport.TTransportException: Read a negative frame size Code Details Cassndra Version : 2.1.10 <persistence-unit name="abc_pu"> <provider>com.impetus.kundera.KunderaPersistence</provider> <class>com.mycompany.model.abc.ClusteredData</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name=

Kundera with Datastax DS Driver Connection Port

依然范特西╮ 提交于 2019-12-23 05:14:30
问题 I'm using Kundera with Datastax DS Driver for Cassandra connection. On persistence.xml, I defined the port as 9042. However, I noticed that that Kundera failed to connect to Cassandra: Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.503 sec <<< FAILURE! - in com.abc.DataServiceImplTest writeReadTest(com.abc.DataServiceImplTest) Time elapsed: 0.38 sec <<< ERROR! com.impetus.kundera.configure.schema.SchemaGenerationException: Error while opening socket, Caused by: . at com

Kundera Cassandra JPQL with Compound Key

ε祈祈猫儿з 提交于 2019-12-23 04:18:16
问题 Am using Kundera JPA for Cassandra. Kundera version is: 3.8 Here are my Entity definitions:- @Embeddable public class PartitionKey implements Serializable { @Column(name = "ID") private String Id; @Column (name = "TYPE") private String Type; } @Embeddable public class CompoundKey implements Serializable { @Embedded private PartitionKey partitionKey; @Column(name = "LABEL") private String label; } @Embeddable public class Comment { @Column(name="comment") private String comment; } @Entity

Cassandra vs logging activity

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 03:45:09
问题 I'm using Cassandra with Kundera. My question is easy... Is any way to log all queries / request to Cassandra ? I'd like to know what exactly happens on server site :) Regards Tom 回答1: Enable DEBUG logging for org.apache.cassandra.thrift.CassandraServer 回答2: Enable DEBUG logging for org.apache.cassandra.transport.Message: log4j.logger.org.apache.cassandra.transport.Message=DEBUG This logs only PreparedStatements!! for example: DEBUG [Native-Transport-Requests:167] 2015-06-01 15:56:15,186

Kundera for Cassandra - Deleting record by row key

大兔子大兔子 提交于 2019-12-13 17:22:13
问题 I'm trying to delete specific record from database by row key. But when I try to execute this query: Query query = em.createQuery( "DELETE FROM User u WHERE u.userId = :u"); query.setParameter("u", userID).executeUpdate(); I got this exception: " Condition = is not suported for query on row key! ". Is there any workaround, or I missing something? 回答1: What you can do as a workaround is: Find using: User u = em.find(User.class, userId) and then, em.delete(u); 回答2: Also, http://groups.google

For Cassandra kundera.client.lookup.class options

我怕爱的太早我们不能终老 提交于 2019-12-12 05:36:04
问题 In order to configure kundera for Cassandra, I notice there are 3 possible options for kundera.client.lookup.class as below com.impetus.client.cassandra.pelops.PelopsClientFactory com.impetus.kundera.client.cassandra.dsdriver.DSClientFactory com.impetus.client.cassandra.thrift.ThriftClientFactory I am not sure of the Pros and Cons of the above 3 and hence not sure which one to use. Please help me decide 回答1: I suggest you to use com.impetus.client.cassandra.thrift.ThriftClientFactory . It is

Caused by: javax.persistence.PersistenceException: org.apache.cassandra.serializers.MarshalException: Unexpected extraneous bytes after map value

允我心安 提交于 2019-12-12 03:36:38
问题 I have a table in cassandra which has a column of type MAP (i.e) source_id_map map When I try to read a row from this table, I see that there is some issue while reading column of map type as below Caused by: javax.persistence.PersistenceException: org.apache.cassandra.serializers.MarshalException: Unexpected extraneous bytes after map value at com.impetus.client.cassandra.datahandler.CassandraDataHandlerBase.setCollectionValue(CassandraDataHandlerBase.java:2526) at com.impetus.client

Sync 02 nodes in Cassandra

半腔热情 提交于 2019-12-12 03:27:43
问题 I have 02 nodes, one runs on 127.0.0.1 and another runs on 127.0.0.2 Will data that I add to my cluster will appear both on two nodes? As current, when I stop node 1, there is no similar data in the second node, it also throws some exceptions when I use list command: Using default limit of 100 Using default column limit of 100 null UnavailableException() at org.apache.cassandra.thrift.Cassandra$get_range_slices_result.read(Cassandra.java:12346) at org.apache.thrift.TServiceClient.receiveBase

Kundera compatibility with Cassandra 3.0.1

不羁的心 提交于 2019-12-11 12:21:28
问题 Is kundera-cassandra 3.3 fully compatible with Cassandra 3.0.1? As I see, kundera-cassandra uses the cassandra-driver-core-2.1.5.jar and referring to this http://docs.datastax.com/en/developer/driver-matrix/doc/common/driverMatrix.html?scroll=driverMatrix__driver-cmpt-matrix it seams that this driver is not compatible with Version 3 of Cassandra. So is there a way to use kundera-cassandra fully compatible with Cassandra 3? 回答1: Kundera is currently not fully compatible with Cassandra 3.0/+.