Cassandra Reference
Quick reference for Apache Cassandra.
| Port | Protocol | Purpose |
|---|---|---|
| 9042 | CQL | Native client connections (TLS configured via client_encryption_options) |
| 7000 | TCP | Inter-node communication (TLS configured via server_encryption_options) |
| 7199 | JMX | JMX monitoring |
Deprecated Ports
- Port 9142 (
native_transport_port_ssl) was deprecated in Cassandra 4.x and removed in 5.0. TLS is now configured on the standard 9042 port. - Port 7001 (
ssl_storage_port) is deprecated. Internode TLS is configured on the standard 7000 port.
Directories
Section titled “Directories”| Directory | Purpose |
|---|---|
/var/lib/cassandra/data | SSTable data |
/var/lib/cassandra/commitlog | Commit log |
/var/lib/cassandra/saved_caches | Key/row cache |
/var/lib/cassandra/hints | Hinted handoff |
/etc/cassandra/ | Configuration |
/var/log/cassandra/ | Logs |
Configuration Files
Section titled “Configuration Files”| File | Purpose |
|---|---|
cassandra.yaml | Main configuration |
cassandra-env.sh | Environment variables |
jvm11-server.options | JVM settings |
cassandra-rackdc.properties | DC/rack configuration |
logback.xml | Logging configuration |
Consistency Levels
Section titled “Consistency Levels”| Level | Description |
|---|---|
| ANY | One response (including hints) |
| ONE | One replica |
| TWO | Two replicas |
| THREE | Three replicas |
| QUORUM | Majority of replicas |
| LOCAL_QUORUM | Majority in local DC |
| EACH_QUORUM | Majority in each DC |
| ALL | All replicas |
| LOCAL_ONE | One in local DC |
| SERIAL | Serial consistency (LWT) |
| LOCAL_SERIAL | Local serial (LWT) |
Common nodetool Commands
Section titled “Common nodetool Commands”nodetool status # Cluster statusnodetool info # Node infonodetool tpstats # Thread poolsnodetool tablestats ks # Table statsnodetool compactionstats # Compaction statusnodetool repair -pr ks # Primary range repairnodetool flush ks # Flush memtablesnodetool drain # Prepare for shutdownnodetool snapshot # Create backupnodetool describecluster # Cluster infoCQL Quick Reference
Section titled “CQL Quick Reference”-- KeyspaceCREATE KEYSPACE ks WITH replication = { 'class': 'NetworkTopologyStrategy', 'dc1': 3};
-- TableCREATE TABLE ks.users ( user_id UUID PRIMARY KEY, name TEXT);
-- CRUDINSERT INTO ks.users (user_id, name) VALUES (uuid(), 'John');SELECT * FROM ks.users WHERE user_id = ?;UPDATE ks.users SET name = 'Jane' WHERE user_id = ?;DELETE FROM ks.users WHERE user_id = ?;Data Types
Section titled “Data Types”| Type | Description |
|---|---|
UUID | 128-bit unique identifier |
TIMEUUID | Time-based UUID |
TEXT | UTF-8 string |
INT | 32-bit integer |
BIGINT | 64-bit integer |
FLOAT | 32-bit floating point |
DOUBLE | 64-bit floating point |
BOOLEAN | true/false |
TIMESTAMP | Date and time |
DATE | Date only |
BLOB | Binary data |
LIST<T> | Ordered collection |
SET<T> | Unique collection |
MAP<K,V> | Key-value pairs |
Apache Cassandra Project Resources
Section titled “Apache Cassandra Project Resources”Official Resources
Section titled “Official Resources”| Resource | URL |
|---|---|
| Project Website | cassandra.apache.org |
| Documentation | cassandra.apache.org/doc/latest/ |
| Downloads | cassandra.apache.org/download/ |
Source Code and Development
Section titled “Source Code and Development”| Resource | URL |
|---|---|
| GitHub Repository | github.com/apache/cassandra |
| GitHub Mirror (read-only) | github.com/apache/cassandra |
| ASF GitBox | gitbox.apache.org/repos/asf/cassandra.git |
Issue Tracking and Enhancement Proposals
Section titled “Issue Tracking and Enhancement Proposals”| Resource | URL |
|---|---|
| JIRA Issue Tracker | issues.apache.org/jira/browse/CASSANDRA |
| CEP Wiki (Enhancement Proposals) | cwiki.apache.org/confluence/display/CASSANDRA/CEP |
| Cassandra Wiki | cwiki.apache.org/confluence/display/CASSANDRA |
Community
Section titled “Community”| Resource | URL |
|---|---|
| ASF Slack (#cassandra) | s.apache.org/slack-invite (then join #cassandra) |
| Stack Overflow | stackoverflow.com/questions/tagged/cassandra |
Mailing Lists
Section titled “Mailing Lists”| List | Purpose | Subscribe |
|---|---|---|
| user@cassandra.apache.org | User questions and discussions | Subscribe |
| dev@cassandra.apache.org | Development discussions | Subscribe |
| commits@cassandra.apache.org | Commit notifications | Subscribe |
Blogs and News
Section titled “Blogs and News”| Resource | URL |
|---|---|
| Apache Cassandra Blog | cassandra.apache.org/blog/ |
| Planet Cassandra | planetcassandra.org |
Next Steps
Section titled “Next Steps”- CQL Reference - Full CQL guide
- Configuration - Configuration details
- nodetool - Command reference