Cassandra自帶一個nodetool工具,安裝目錄/bin/nodetool
nodetool help:幫助信息
[cassandra@node3 bin]$ ./nodetool help usage: nodetool [(-p <port> | --port <port>)] [(-h <host> | --host <host>)] [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)] [(-pw <password> | --password <password>)] [(-u <username> | --username <username>)] <command> [<args>] The most commonly used nodetool commands are: assassinate 強制刪除節點 bootstrap Monitor/manage node's bootstrap process cleanup 觸發不再屬於某個節點的鍵的立即清除。默認情況下,清除所有鍵空間(常規合並過程最終總會刪除這些數據) clearsnapshot 清楚快照 compact 對一個或多個表強制(主)壓縮,或對給定的SSTables強制用戶定義的壓縮 compactionhistory 打印壓縮的歷史信息 compactionstats 打印壓縮的統計信息 decommission 退服節點,讓該節點不再提供服務(退服節點執行) describecluster 打印集群信息 describering Shows the token ranges info of a given keyspace disableautocompaction 為給定的鍵空間和表關閉自動壓縮 disablebackup 禁用增量備份 disablebinary Disable native transport (binary protocol) disablegossip Disable gossip (effectively marking the node down) disablehandoff 禁止存儲和傳遞提示移交 disablehintsfordc 禁止向數據中心傳輸提示移交 disablethrift Disable thrift server drain 停止監聽來自客戶端和其他節點的命令。刷新所有表 enableautocompaction 為給定的鍵空間和表啟用自動壓縮 enablebackup 開啟增量備份 enablebinary Reenable native transport (binary protocol) enablegossip Reenable gossip enablehandoff 重新啟用當前節點上存儲和傳遞提示移交 enablehintsfordc 為以前禁用的數據中心開啟提示移交 enablethrift Reenable thrift server failuredetector Shows the failure detector information for the cluster flush 刷新memtable到sstable。flush keyspace [table] garbagecollect Remove deleted data from one or more tables gcstats Print GC Statistics getcompactionthreshold 查看表的合並閾值 getcompactionthroughput 查看系統中壓縮/合並的吞吐量上限 MB/s getconcurrentcompactors Get the number of concurrent compactors in the system. getendpoints Print the end points that owns the key getinterdcstreamthroughput Print the Mb/s throughput cap for inter-datacenter streaming in the system getlogginglevels 打印日志級別 getsstables Print the sstable filenames that own the key getstreamthroughput Print the Mb/s throughput cap for streaming in the system gettimeout Print the timeout of the given type in ms gettraceprobability Print the current trace probability value gossipinfo 打印這個節點通過gossip向其他節點傳遞的參數 help 打印幫助信息 info 打印節點信息 invalidatecountercache 清除計數器緩存 invalidatekeycache 清除鍵緩存 invalidaterowcache 清除行緩存 join Join the ring listsnapshots 顯示快照 move 重新分配token。 move +節點開始令牌 netstats Print network information on provided host (connecting node by default) pausehandoff 暫停提示移交傳輸進程 proxyhistograms 顯示了讀請求、寫請求和區間請求的延遲。在這里所請求的節點作為協調器。 rangekeysample Shows the sampled keys held across all keyspaces rebuild 從其他節點重建數據 rebuild_index 重建二級索引,與修復一樣,CPU和I/O開銷很大 refresh 在不重啟的情況下將新放置的SSTables加載到系統中 refreshsizeestimates Refresh system.size_estimates reloadlocalschema Reload local node schema from system tables reloadtriggers Reload trigger classes relocatesstables Relocates sstables to the correct disk removenode 移除節點 repair 通過逆熵修復表 replaybatchlog Kick off batchlog replay and wait for finish resetlocalschema Reset node's local schema and resync resumehandoff Resume提示移交傳輸進程 ring 查看token環信息 scrub Scrub (rebuild sstables for) one or more tables setcachecapacity 設置全局鍵、行和計數器緩存容量(以MB為單位) setcachekeystosave 覆蓋為保持緩存元素所配置的設置,即一個文件中要保持多少個鍵緩存和行緩存 setcompactionthreshold 設置合並閾值的最小和最大值 setcompactionthroughput 為系統中的壓縮/合並設吞吐量上限MB/s,或設置0以禁用節流 setconcurrentcompactors Set number of concurrent compactors in the system. sethintedhandoffthrottlekb 控制提示傳送時使用的帶寬 setinterdcstreamthroughput Set the Mb/s throughput cap for inter-datacenter streaming in the system, or 0 to disable throttling setlogginglevel 動態設置日志級別 setstreamthroughput Set the Mb/s throughput cap for streaming in the system, or 0 to disable throttling settimeout Set the specified timeout in ms, or 0 to disable timeout settraceprobability 設置將任何給定請求跟蹤到值的概率。0為禁用,1為所有請求啟用,0為默認值 snapshot 創建快照 status 打印集群信息 statusbackup 查看增量備份狀態 statusbinary Status of native transport (binary protocol) statusgossip 打印gossip狀態 statushandoff 打印當前節點提交移交狀態 statusthrift 打印thrift服務狀態 stop Stop compaction stopdaemon Stop cassandra daemon tablehistograms 打印給定表的統計直方圖 tablestats 打印表統計信息 toppartitions Sample and print the most active partitions for a given column family tpstats 打印線程池統計信息 truncatehints 截斷本地節點上的所有提示移交,或截斷指定端點的提示移交. upgradesstables 升級操作之后運行,將存儲的數據文件轉換為最新的格式。 verify Verify (check data checksum for) one or more tables version 打印cassandra版本 viewbuildstatus Show progress of a materialized view build
getmaxhintwindow 4.0新增,打印最大的提示移交窗口
handoffwindow 打印當前提示移交的切換窗口
setmaxhintwindow 設置指定的最大提示窗口
See 'nodetool help <command>' for more information on a specific command.