Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Reference

Quick reference for Apache Cassandra.

PortProtocolPurpose
9042CQLNative client connections (TLS configured via client_encryption_options)
7000TCPInter-node communication (TLS configured via server_encryption_options)
7199JMXJMX 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.
DirectoryPurpose
/var/lib/cassandra/dataSSTable data
/var/lib/cassandra/commitlogCommit log
/var/lib/cassandra/saved_cachesKey/row cache
/var/lib/cassandra/hintsHinted handoff
/etc/cassandra/Configuration
/var/log/cassandra/Logs
FilePurpose
cassandra.yamlMain configuration
cassandra-env.shEnvironment variables
jvm11-server.optionsJVM settings
cassandra-rackdc.propertiesDC/rack configuration
logback.xmlLogging configuration
LevelDescription
ANYOne response (including hints)
ONEOne replica
TWOTwo replicas
THREEThree replicas
QUORUMMajority of replicas
LOCAL_QUORUMMajority in local DC
EACH_QUORUMMajority in each DC
ALLAll replicas
LOCAL_ONEOne in local DC
SERIALSerial consistency (LWT)
LOCAL_SERIALLocal serial (LWT)
Terminal window
nodetool status # Cluster status
nodetool info # Node info
nodetool tpstats # Thread pools
nodetool tablestats ks # Table stats
nodetool compactionstats # Compaction status
nodetool repair -pr ks # Primary range repair
nodetool flush ks # Flush memtables
nodetool drain # Prepare for shutdown
nodetool snapshot # Create backup
nodetool describecluster # Cluster info
-- Keyspace
CREATE KEYSPACE ks WITH replication = {
'class': 'NetworkTopologyStrategy', 'dc1': 3
};
-- Table
CREATE TABLE ks.users (
user_id UUID PRIMARY KEY,
name TEXT
);
-- CRUD
INSERT 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 = ?;
TypeDescription
UUID128-bit unique identifier
TIMEUUIDTime-based UUID
TEXTUTF-8 string
INT32-bit integer
BIGINT64-bit integer
FLOAT32-bit floating point
DOUBLE64-bit floating point
BOOLEANtrue/false
TIMESTAMPDate and time
DATEDate only
BLOBBinary data
LIST<T>Ordered collection
SET<T>Unique collection
MAP<K,V>Key-value pairs

ResourceURL
Project Websitecassandra.apache.org
Documentationcassandra.apache.org/doc/latest/
Downloadscassandra.apache.org/download/
ResourceURL
GitHub Repositorygithub.com/apache/cassandra
GitHub Mirror (read-only)github.com/apache/cassandra
ASF GitBoxgitbox.apache.org/repos/asf/cassandra.git
ResourceURL
JIRA Issue Trackerissues.apache.org/jira/browse/CASSANDRA
CEP Wiki (Enhancement Proposals)cwiki.apache.org/confluence/display/CASSANDRA/CEP
Cassandra Wikicwiki.apache.org/confluence/display/CASSANDRA
ResourceURL
ASF Slack (#cassandra)s.apache.org/slack-invite (then join #cassandra)
Stack Overflowstackoverflow.com/questions/tagged/cassandra
ListPurposeSubscribe
user@cassandra.apache.orgUser questions and discussionsSubscribe
dev@cassandra.apache.orgDevelopment discussionsSubscribe
commits@cassandra.apache.orgCommit notificationsSubscribe
ResourceURL
Apache Cassandra Blogcassandra.apache.org/blog/
Planet Cassandraplanetcassandra.org