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 Datastax CQL Driver - Autodiscovery of Cassandra Nodes #645

Open dhayek opened 10 years ago

dhayek commented 10 years ago

Hi

I'm working with version 2.13.1 of the Kundera Cassandra Datastax driver:

        <groupId>com.impetus.kundera.client</groupId>
        <artifactId>kundera-cassandra-ds-driver</artifactId>
        <version>2.13.1</version>

We have three nodes in our ring, but the Kundera Datastax driver only seems to connect to the one host that is configured in persistence.xml. (I noticed this issue when that host went down briefly.)

When I tried using the Datastax CQL driver directly with the same initial host, it autodiscovered the other 2 in the ring.

What properties do I need to set in persistence.xml to force the Kundera Datastax driver to autodiscover all of the nodes in the ring?

Thanks

David

DaVincii commented 10 years ago

In order to make all the nodes in your ring available to Kundera, you need to specify them in an external configuration file.

For further details check this link :

https://github.com/impetus-opensource/Kundera/wiki/Using-multiple-node-support-and-load-balancing-policy-in-Kundera

chhavigangwal commented 10 years ago

@dhayek

Is the issue resolved at your end ?

Chhavi

avinashkp commented 9 years ago

Alternatively can I add the nodes dynamically using properties being set while creating the EntityManagerFactory? http://stackoverflow.com/questions/13140082/change-content-in-persistence-xml-dynamically-during-execution

hkroger commented 7 years ago

Hmm, DataStax driver that is being used underneath handles these a bit smarter than Kundera configuration currently allows. It would be great if those could be utilized using Kundera as well.

For example following things are missing in Kundera but available in underlying driver: