Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cassandra-kubernetes/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cassandra-1 1/1 Running 0 2h
You can also verify the health of your cluster by running

----
$ kubectl exec <pod_name> -it nodetool status
$ kubectl exec <pod_name> -- nodetool status
Datacenter: DC1-K8Demo
======================
Status=Up/Down
Expand Down
6 changes: 3 additions & 3 deletions cassandra-kubernetes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<properties>
<category>Database</category>
<!-- dependency versions -->
<cassandra.driver.version>4.0.0</cassandra.driver.version>
<cassandra.driver.version>4.19.2</cassandra.driver.version>
<main.class>org.apache.camel.spring.Main</main.class>
</properties>

Expand Down Expand Up @@ -74,8 +74,8 @@
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<version>${cassandra.driver.version}</version>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*/
package org.apache.camel.example.kubernetes.jkube;

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;
import com.datastax.oss.driver.api.core.CqlSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -26,8 +25,7 @@ public class CqlPopulateBean {
private static final Logger log = LoggerFactory.getLogger(CqlPopulateBean.class);

public void populate() {
try (Cluster cluster = Cluster.builder().addContactPoint("cassandra").build();
Session session = cluster.connect()) {
try (CqlSession session = CqlSession.builder()/*.addContactEndPoint("cassandra")*/.build();) {
session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION = {'class':'SimpleStrategy', 'replication_factor':1};");
session.execute("CREATE TABLE IF NOT EXISTS test.users ( id int primary key, name text );");
session.execute("INSERT INTO test.users (id,name) VALUES (1, 'oscerd') IF NOT EXISTS;");
Expand Down