1. 心跳檢測, 儲存supervisor和worker的心跳(包括它們的狀態),使得nimbus可以監控整個叢集的狀態, 從而重啟一些掛掉的worker;
2. 提交任務
3. 儲存整個叢集的所有狀態資訊, 供ui顯示
4. storm在zk上的儲存結構
/-{storm-zk-root} -- storm在zookeeper上的根目錄(預設為/storm) | |-/assignments -- topology的任務分配資訊 | | | |-/{topology-id} -- 這個目錄儲存的是每個topology的assignments資訊包括:對應的nimbus上 | -- 的代碼目錄,所有task的啟動時間,每個task與機器、連接埠的映射。操作為 | -- (assignments)來擷取所有assignments的值;以及(assignment-info storm-id) | -- 來得到給定的storm-id對應的AssignmentInfo資訊 | -- 在AssignmentInfo中儲存的內容有: | -- :executor->node+port :executor->start-time-secs :node->host | -- 具體定義在common.clj中的 | -- (defrecord Assignment[master-code-dir node->host executor->node+port executor->start-time-secs]) | |-/storms -- 這個目錄儲存所有正在啟動並執行topology的id | | | | | |-/{topology-id} -- 這個檔案儲存這個topology的一些資訊,包括topology的名字,topology開始運行 | -- 的時間以及這個topology的狀態。操作(active-storms),獲得當前路徑活躍的下 | -- topology資料。儲存的內容參考類StormBase;(storm-base storm-id)得到給定的 | -- storm-id下的StormBase資料,具體定義在common.clj中的 | -- (defrecord StormBase [storm-name launch-time-secs status num-workers component->executors]) | |-/supervisors -- 這個目錄儲存所有的supervisor的心跳資訊 | | | | | |-/{supervisor-id} -- 這個檔案儲存supervisor的心跳資訊包括:心跳時間,主機名稱,這個supervisor上 | -- worker的連接埠號碼,已耗用時間(具體看SupervisorInfo類)。操作(supervisors)得到 | -- 所有的supervisors節點;(supervisor-info supervisor-id)得到給定的 | -- supervisor-id對應的SupervisorInfo資訊;具體定義在common.clj中的 | | -- (defrecord SupervisorInfo [time-secs hostname assignment-id used-ports meta scheduler-meta uptime-secs]) | |-/workerbeats -- 所有worker的心跳 | | | |-/{topology-id} -- 這個目錄儲存這個topology的所有的worker的心跳資訊 | | | |-/{supervisorId-port} -- worker的心跳資訊,包括心跳的時間,worker已耗用時間以及一些統計資訊 | | -- 操作(heartbeat-storms)得到所有有心跳資料的topology, | -- (get-worker-heartbeat storm-id node port)得到具體一個topology下 | -- 的某個worker(node:port)的心跳狀況, | -- (executor-beats storm-id executor->node+port)得到一個executor的心跳狀況 | |-/errors -- 所有產生的error資訊 | |-/{topology-id} -- 這個目錄儲存這個topology下面的錯誤資訊。操作(error-topologies)得到出錯 | -- 的topology;(errors storm-id component-id)得到 | -- 給定的storm-id component-id下的出錯資訊 |-/{component-id}