This section provides detailed documentation for all major MBeans exposed by Apache Cassandra. Each MBean includes attributes, operations, and practical examples.
ObjectName : org.apache.cassandra.db:type=StorageService
The primary MBean for cluster-level operations. Controls node lifecycle, topology changes, and cluster-wide operations.
Attribute Type Description LiveNodesList IP addresses of live nodes UnreachableNodesList IP addresses of unreachable nodes JoiningNodesList Nodes currently joining LeavingNodesList Nodes currently leaving MovingNodesList Nodes currently moving OperationModeString STARTING, NORMAL, JOINING, LEAVING, etc. ClusterNameString Cluster name LocalHostIdString UUID of this node TokensList Tokens owned by this node ReleaseVersionString Cassandra version SchemaVersionUUID Current schema version KeyspacesList All keyspace names NativeTransportRunningboolean CQL port status GossipRunningboolean Gossip status Initializedboolean Node initialized
Operation Parameters Description forceKeyspaceFlushkeyspace Flush memtables to disk forceKeyspaceCompactionkeyspace Trigger major compaction takeSnapshottag, keyspaces Create snapshot clearSnapshottag, keyspaces Remove snapshot repairkeyspace, options Start repair decommission- Remove node from cluster movenewToken Move node to new token removeNodehostId Force remove dead node assassinateaddress Remove via gossip drain- Flush and stop accepting writes truncatekeyspace, table Truncate table refreshSizeEstimates- Update size estimates
nodetool Command JMX Operation nodetool statusgetLiveNodes(), getUnreachableNodes()nodetool flushforceKeyspaceFlush()nodetool compactforceKeyspaceCompaction()nodetool snapshottakeSnapshot()nodetool repairrepair()nodetool decommissiondecommission()nodetool draindrain()nodetool infoVarious attributes
ObjectName ssBean = new ObjectName ( " org.apache.cassandra.db:type=StorageService " ) ;
List < String > liveNodes = ( List< String > ) mbsc . getAttribute ( ssBean, " LiveNodes " ) ;
System . out . println ( " Live nodes: " + liveNodes ) ;
String mode = (String) mbsc . getAttribute ( ssBean, " OperationMode " ) ;
System . out . println ( " Mode: " + mode ) ;
String cluster = (String) mbsc . getAttribute ( ssBean, " ClusterName " ) ;
System . out . println ( " Cluster: " + cluster ) ;
ObjectName : org.apache.cassandra.db:type=StorageProxy
Controls request coordination settings including timeouts and consistency behavior.
Attribute Type Description TotalHintslong Total hints stored HintsInProgressint Hints currently being delivered ReadRepairAttemptedlong Read repair attempts ReadRepairRepairedBlockinglong Blocking read repairs ReadRepairRepairedBackgroundlong Background read repairs SchemaVersionsMap Schema versions per node
Attribute Type Default Description RpcTimeoutlong 10000ms General RPC timeout ReadRpcTimeoutlong 5000ms Read timeout WriteRpcTimeoutlong 2000ms Write timeout RangeRpcTimeoutlong 10000ms Range query timeout CounterWriteRpcTimeoutlong 5000ms Counter write timeout TruncateRpcTimeoutlong 60000ms Truncate timeout
Operation Description setRpcTimeoutSet general timeout setReadRpcTimeoutSet read timeout setWriteRpcTimeoutSet write timeout reloadTriggerClassesReload trigger classes
ObjectName : org.apache.cassandra.db:type=CompactionManager
Controls compaction operations and provides compaction statistics.
Attribute Type Description PendingTasksint Pending compaction tasks CompletedTaskslong Completed compactions CompactionsList Currently running compactions PendingTasksByTableNameMap Pending tasks per table
Operation Parameters Description forceUserDefinedCompactionks, table, files Compact specific SSTables stopCompactiontype Stop compaction by type stopCompactionByIdcompactionId Stop specific compaction setConcurrentCompactorsvalue Set parallel compactors getConcurrentCompactors- Get parallel compactor count setCompactionThroughputmbPerSec Set throughput limit getCompactionThroughput- Get throughput limit
nodetool Command JMX Operation nodetool compactionstatsgetCompactions(), getPendingTasks()nodetool setcompactionthroughputsetCompactionThroughput()nodetool stop COMPACTIONstopCompaction()
ObjectName cmBean = new ObjectName ( " org.apache.cassandra.db:type=CompactionManager " ) ;
// Get pending compactions
int pending = ( int ) mbsc . getAttribute ( cmBean, " PendingTasks " ) ;
System . out . println ( " Pending compactions: " + pending ) ;
// Get active compactions
List < Map < String , String >> compactions =
( List<Map< String, String >> ) mbsc . getAttribute ( cmBean, " Compactions " ) ;
for ( Map < String , String > c : compactions) {
System . out . println ( " Compacting: " + c . get ( " keyspace " ) + " . " + c . get ( " columnfamily " )) ;
System . out . println ( " Progress: " + c . get ( " progress " ) + " % " ) ;
ObjectName : org.apache.cassandra.db:type=ColumnFamilies,keyspace={ks},columnfamily={table}
Per-table operations and statistics.
Attribute Type Description LiveSSTableCountint Number of live SSTables LiveDiskSpaceUsedlong Disk space used (bytes) TotalDiskSpaceUsedlong Total disk space MemtableColumnsCountlong Columns in memtable MemtableSwitchCountint Memtable flush count MemtableLiveDataSizelong Memtable data size BloomFilterFalsePositiveslong Bloom filter false positives BloomFilterFalseRatiodouble False positive ratio MeanPartitionSizelong Average partition size MaxPartitionSizelong Maximum partition size CompressionRatiodouble Compression ratio SSTablesPerReadHistogramlong[] SSTables accessed per read
Operation Description forceFlushFlush memtable forceCompactionForTokenRangeCompact token range estimateKeysEstimate key count loadNewSSTablesLoad new SSTables from disk setCompactionStrategyClassChange compaction strategy setCompactionThresholdsSet min/max thresholds
ObjectName : org.apache.cassandra.gms:type=Gossiper
Gossip protocol management.
Attribute Type Description EndpointStatesMap State of all known endpoints DownEndpointsSet Down endpoints
Operation Description assassinateEndpointRemove endpoint via gossip unsafeAssassinateEndpointForce assassinate getCurrentGenerationNumberGet gossip generation getEndpointDowntimeGet endpoint downtime
ObjectName : org.apache.cassandra.net:type=MessagingService
Inter-node messaging statistics.
Attribute Type Description DroppedMessagesMap Dropped messages by type RecentlyDroppedMessagesMap Recently dropped messages TimeoutsPerHostMap Timeouts per remote host
Type Description MUTATIONWrite requests READRead requests READ_REPAIRRead repair requests REQUEST_RESPONSEResponses RANGE_SLICERange query requests PAGED_RANGEPaged range requests COUNTER_MUTATIONCounter writes HINTHint delivery
ObjectName msBean = new ObjectName ( " org.apache.cassandra.net:type=MessagingService " ) ;
Map < String , Integer > dropped =
( Map< String, Integer > ) mbsc . getAttribute ( msBean, " DroppedMessages " ) ;
for ( Map . Entry < String , Integer > entry : dropped . entrySet () ) {
if ( entry . getValue () > 0 ) {
System . out . println ( " WARNING: " + entry . getValue () +
" dropped " + entry . getKey () + " messages " ) ;
ObjectName : org.apache.cassandra.db:type=Caches
Cache management and statistics.
Attribute Type Description KeyCacheCapacityInByteslong Key cache size KeyCacheSizelong Keys in cache KeyCacheHitslong Cache hits KeyCacheMisseslong Cache misses KeyCacheRecentHitRatedouble Recent hit rate RowCacheCapacityInByteslong Row cache size RowCacheSizelong Rows in cache RowCacheHitslong Cache hits RowCacheMisseslong Cache misses RowCacheRecentHitRatedouble Recent hit rate
Operation Description invalidateKeyCacheClear key cache invalidateRowCacheClear row cache setKeyCacheCapacitySet key cache size setRowCacheCapacitySet row cache size saveCachesPersist caches to disk
ObjectName : org.apache.cassandra.db:type=Commitlog
Attribute Description CompletedTasksCompleted commit log tasks PendingTasksPending tasks TotalCommitLogSizeTotal commit log size ActiveSegmentCountActive segments
ObjectName : org.apache.cassandra.db:type=HintedHandoffManager
Attribute Description StoredHintsTotal stored hints EndpointsWithPendingHintsEndpoints waiting for hints
ObjectName : org.apache.cassandra.streaming:type=StreamManager
Attribute Description CurrentStreamsActive streams
ObjectName : org.apache.cassandra.locator:type=EndpointSnitchInfo
Attribute Description SnitchNameActive snitch class DatacenterLocal datacenter RackLocal rack
ObjectName : org.apache.cassandra.gms:type=FailureDetector
Monitors node availability using the Phi Accrual failure detector algorithm.
Attribute Description AllEndpointStatesState information for all known endpoints SimpleStatesSimplified UP/DOWN status for endpoints PhiValuesCurrent phi values for each endpoint
Operation Description getEndpointState(String)Get gossip state for specific endpoint forceConviction(String)Force mark endpoint as down