commit | 02cc6548f291528e9749a51d103463f9552f4b4e | [log] [tgz] |
---|---|---|
author | Francisco Guerrero <francisco.guerrero@apple.com> | Wed Nov 02 12:54:54 2022 -0700 |
committer | Yifan Cai <yifan_cai@apple.com> | Fri Nov 18 10:16:17 2022 -0800 |
tree | dc8bdd297e479b5f51c2ba4487327a0030600e55 | |
parent | 30c04eb38a796183643bdcbaff8f425d90ebf671 [diff] |
CASSANDRASC-47: Introduce JMX foundation in Sidecar In this commit, we introduce the JMX foundation in Sidecar to enable the ability to communicate with the Cassandra process. This commit adds new configuration parameters to configure the a `org.apache.cassandra.sidecar.common.JmxClient`. This client is available as part of the Cassandra delegate. A new interface is introduced and exposed through the `org.apache.cassandra.sidecar.common.ICassandraAdapter`. The new interface `StorageOperations` is intended to interface with the Cassandra StorageService. This commit provides an example implementation of the `takeSnapshot` method, which is also found in the Cassandra code base. This should allow us to interact with the Cassandra process to create snapshots. A fix is required in the `CassandraSidecarDaemon` class, where the `healthCheck` runs the first time only after the configured health check frequency (millis) has passed. This causes issues in the unit tests as well as the actual execution of the service, as the `adapter` will be `null` until the first health check is performed. To fix this issue, we perform a health check right after the server successfully starts up. Additional integration tests are added for testing the JMX integration with Cassandra. In the test, we spin up a new Cassandra container using `testcontainers` and we perform validation against the StorageService in Cassandra. Co-authored-by: Doug Rohrer <drohrer@apple.com> patch by Francisco Guerrero, Doug Rohrer; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-47
This is a Sidecar for the highly scalable Apache Cassandra database. For more information, see the Apache Cassandra web site and CIP-1.
This is project is still WIP.
After you clone the git repo, you can use the gradle wrapper to build and run the project. Make sure you have Apache Cassandra running on the host & port specified in conf/sidecar.yaml
.
$ ./gradlew run
While setting up cassandra instance, make sure the data directories of cassandra are in the path stored in sidecar.yaml file, else modify data directories path to point to the correct directories for stream APIs to work.
We rely on docker containers for integration tests.
The only requirement is to install and run Docker on your test machine.
You will need to use the “Add Projects” function of CircleCI to set up CircleCI on your fork. When promoted to create a branch, do not replace the CircleCI config, choose the option to do it manually. CircleCI will pick up the in project configuration.
We warmly welcome and appreciate contributions from the community. Please see CONTRIBUTING.md if you wish to submit pull requests.