storm-0.9.3 wordcount例子執行步驟(單機版)
阿新 • • 發佈:2019-01-04
網上關於Storm wordcount的例子很多,不過都是基於storm-0.9.0.1,在執行例子過程中torm 0.9.0.1.jar在maven中央倉庫沒有找到只有0.9.3,在執行過程中出現了好多問題。所以記下筆記。方便以後檢視。 1, 下載Storm,地址為http://www.apache.org/dyn/closer.cgi/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz Storm用於將JAR包和Topology的主類提交給nimbus 2, 解壓:apache-storm-0.9.3.tar.gz. 3,進入目錄apache-storm-0.9.3執行命令:mvn clean install -DskipTests=true 下載依賴jar包 4,編譯例子:mvn compile exec:java -Dstorm.topology=storm.starter.WordCountTopology 5,將編譯後的jar複製到storm的bin目錄:storm-starter-0.9.3-jar-with-dependencies.jar 6,執行:storm jar storm-starter-0.9.3-jar-with-dependencies.jar storm.starter.WordCountTopology -c nimbus.host=localhost 7,開啟storm ui,可以看到對應的Topology,則釋出成功 注意:在下載依賴jar的過程中可能部分jar包,找不到,則從storm的安裝目錄copy的.m2中。其中rely.jar實在找不到。。 為了測試暫且把一個jar改名為reply.jar來進行編譯了。。。。