Skip to content

Commit

Permalink
Support for Cassandra 4.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jhberthemet committed Jul 18, 2024
1 parent 2ef4b09 commit b721a61
Show file tree
Hide file tree
Showing 18 changed files with 2,217 additions and 2,288 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This documentation explains usage and configuration of "ESIndex" that is a Elast

This plugin requires an Elasticsearch (ES) cluster already configured.

The plugin will install in a regular Cassandra 3.11.x release downloaded from http://cassandra.apache.org/.
The plugin will install in a regular Cassandra 4.0.x release downloaded from http://cassandra.apache.org/.
There is nothing to change in Cassandra configuration files to support the index.
Cassandra’s behaviour remains unchanged for applications that do not use the index.

Expand All @@ -62,17 +62,17 @@ ElasticSearch index for Cassandra using:
![Diag](doc/diagram.png)

# Supported Versions
Tested versions are Elasticsearch 5.x, 6.x and Cassandra 3.11.x. However the plugin may also work with different Elasticsearch versions
(1.7, 2.x 5.x, 6.x) if the application provides the corresponding mappings and options.
Other versions of Apache Cassandra like 3.0, 2.2 or 4.0 are not supported as the secondary index interface used by the plugin is different.
Tested versions are Elasticsearch 5.x, 6.x, 7.x and Cassandra 4.0.x. However the plugin may also work with different Elasticsearch versions
(1.7, 2.x 5.x, 6.x, 7.x) if the application provides the corresponding mappings and options.
Other versions of Apache Cassandra like 1.x 2.x, 3.x or 4.1 are not supported as the secondary index interface used by the plugin is different.
Other Cassandra vendors are not tested, ScyllaDB is not supported.

| Versions | Elasticsearch 1.x | Elasticsearch 2.x | Elasticsearch 5.x | Elasticsearch 6.x |
|---|---|---|---|---|
| Cassandra 2.x | No | No | No | No |
| Cassandra 3.x | No | No | No | No |
| Cassandra 3.11.x | Limited | Limited | Yes | Yes |
| Cassandra 4.x | No | No | No | No |
| Versions | Elasticsearch 1.x | Elasticsearch 2.x | Elasticsearch 5.x | Elasticsearch 6.x | Elasticsearch 7.x |
|---------------|-------------------|-------------------|-------------------|--------------------|--------------------|
| Cassandra 1.x | No | No | No | No | No |
| Cassandra 2.x | No | No | No | No | No |
| Cassandra 3.x | No | No | No | No | No |
| Cassandra 4.x | Limited | Limited | Limited | Yes | Yes |

* **No**: Plugin can't work due to different Cassandra interface.
* **Yes**: Plugin works without problem.
Expand All @@ -91,21 +91,21 @@ This will build a "all in one jar' in `target/distribution/lib4cassandra`
<dependency>
<groupId>com.genesyslab</groupId>
<artifactId>es-index</artifactId>
<version>9.1.002.00</version>
<version>9.2.000.00</version>
</dependency>
```
See [Github Package](https://github.com/GenesysPureEngagePremise/cassandra-es-index/packages)

See [Maven repository](https://mvnrepository.com/artifact/com.genesys/es-index/9.1.002.00)

## Installing the plugin in Cassandra
Put `es-index-9.1.000.xx-jar-with-dependencies.jar` in the lib folder of Cassandra along with other Cassandra jars,
Put `es-index-9.2.000.xx-jar-with-dependencies.jar` in the lib folder of Cassandra along with other Cassandra jars,
for example '/usr/share/cassandra/lib' on all Cassandra nodes. Start or restart your Cassandra node(s).

## Upgrade of an existing version
1. Stop Cassandra node.
2. Remove old es-index-9.1.001.\<v1>-jar-with-dependencies.jar
3. Add new es-index-9.1.001.\<v2>-jar-with-dependencies.jar
2. Remove old es-index-9.2.000.\<v1>-jar-with-dependencies.jar
3. Add new es-index-9.2.000.\<v2>-jar-with-dependencies.jar
4. Start Cassandra node.
5. Proceed to next node.

Expand Down Expand Up @@ -886,6 +886,10 @@ This is an example of asynchronous write, Cassandra operation will **not** fail
![Write Path async](doc/write-path-async-fail.png)

# Changes
## Version 9.2.000
* Support for Cassandra 4.0.x
* Drop support for Cassandra 3.x

## Version 9.1.003
* Support for ES 7.x (plugin needs to be upraded before ES, using 7.x with older plugin will not work)
* Support for Cassandra 3.11.5 (just testing, older versions will work as well)
Expand Down
86 changes: 24 additions & 62 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.genesys</groupId>
<artifactId>es-index</artifactId>
<version>9.1.003.00</version>
<version>9.2.000.00</version>
<packaging>jar</packaging>

<name>es-index</name>
Expand All @@ -23,7 +23,7 @@

<organization>
<name>Genesys Telecommunications Laboratories, Inc.</name>
<url>http://www.genesys.com</url>
<url>https://www.genesys.com</url>
</organization>

<licenses>
Expand All @@ -44,7 +44,7 @@
<name>Jacques-Henri Berthemet</name>
<email>support@genesys.com</email>
<organization>Genesys</organization>
<organizationUrl>http://genesys.com</organizationUrl>
<organizationUrl>https://genesys.com</organizationUrl>
</developer>
</developers>

Expand All @@ -65,7 +65,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Compile -->
<version.cassandra.esindex>4.0.10</version.cassandra.esindex>
<version.cassandra.esindex>4.0.13</version.cassandra.esindex>
<version.jest>5.3.2</version.jest>
<version.google.gson>2.8.9</version.google.gson>
<version.findbugs.annotations>3.0.1u2</version.findbugs.annotations>
Expand All @@ -87,15 +87,14 @@
</properties>

<dependencies>
<!-- Cassandra 3.11.x -->
<!-- Cassandra 4.0 -->
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<scope>provided</scope>
<version>${version.cassandra.esindex}</version>
<exclusions>
<exclusion>
<!-- Don't know why libthrift needs httpcore but actual Cassandra 3.11 don't have it so it's OK to exclude it-->
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
Expand All @@ -109,15 +108,15 @@
<version>${version.jest}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId> <!-- Cassandra already have it, 1.7.7 for both-->
<groupId>org.slf4j</groupId> <!-- Cassandra already have it, 1.7.25 for both-->
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-codec</groupId> <!-- Cassandra already have it, 1.9 for both -->
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId> <!-- Cassandra already have it, 18.0 for both -->
<groupId>com.google.guava</groupId> <!-- Cassandra already have it, 27.0 for both -->
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
Expand Down Expand Up @@ -161,8 +160,8 @@
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
</dependencies>

</dependencies>

<build>
<plugins>
Expand All @@ -180,19 +179,6 @@
<target>${java-source-version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -207,51 +193,13 @@
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand All @@ -262,6 +210,20 @@
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${version.maven.project.info.reports.plugin}</version>
</plugin>
</plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit b721a61

Please sign in to comment.