storm1.2.1-單機部署,執行自己開發的jar
專案原始碼下載:
https://download.csdn.net/download/adam_zs/10294489
linux執行的jar在target目錄下面
1.下載strom 1.2.1版本,上傳路伺服器目錄/home/software/
2.解壓stromtar -zxvf /home/software/apache-storm-1.2.1.tar.gz -C /home/
3.strom啟動-單機(解壓後不用修改任何檔案)
cd /home/apache-storm-1.2.1/
dev-zookeeper 啟動zk(strom自帶的zookeeper)
nohup bin/storm dev-zookeeper &
nimbus 啟動主節點
nohup bin/storm nimbus &
supervisor 啟動從節點
nohup bin/storm supervisor &
ui 啟動UI介面
nohup bin/storm ui &
logviewer 啟動日誌檢視服務
nohup bin/storm logviewer &
執行完畢 jps -l 查詢程序,如果出現如下程序說明strom啟動完成
4.訪問UI
http://172.20.43.xx:8080/index.html
bin/storm jar /home/software/storm-wangzs/storm1.2.1-wangzs-0.0.1-SNAPSHOT.jar com.wangzs.chapter1.wordcountreliable.WordCountTopology wordCountTopology-wangzs
bin/storm jar 執行jar名稱 需要執行的java類 TopologyBuilder名字