Building and IDE Integration
This page covers setting up Apache Cassandra in IntelliJ IDEA and Eclipse for development and debugging.
Prerequisites
Before IDE setup, ensure you have:
-
Built Cassandra from source (see Getting Started)
-
JDK 11 or 17 installed
-
Git installed and the repository cloned
IntelliJ IDEA
IntelliJ IDEA Community Edition includes everything needed for Cassandra development.
Generate Project Files
After building Cassandra, generate the IntelliJ project files:
ant generate-idea-files
This creates project files with:
-
Run/debug defaults for JUnit
-
Run/debug configuration for the Cassandra daemon
-
License header template for Java source files
-
Cassandra code style settings
-
Code inspections
Eclipse
Eclipse IDE for Java Developers can also be used for Cassandra development.
Debugging a Running Cassandra Instance
You can attach your IDE’s debugger to a running Cassandra process.
Start Cassandra with Debug Options
Set the JVM debug agent before starting Cassandra:
export JVM_EXTRA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1414"
./bin/cassandra
Multiple Working Trees
Use git worktree to maintain separate working trees for different Cassandra versions from a single clone. This avoids full rebuilds when switching between branches.
|
git worktree add ../cassandra-5.0 cassandra-5.0