Storm 本地環境git
Storm是分佈式,提交的topology會分佈到多個物理機運行。Storm同時提供本地集羣機制,容許storm提交到本地集羣,並且全部的bolt、spout都運行在一個進程內,方便對topology調試。github
1.環境準備 Eclipse 裝maven插件m2e,help/eclipse marketplace找到maven integration for eclipse安裝。數據庫
2.storm jar下載配置apache
五年前的源碼https://github.com/nathanmarz/stormwindows
Git最新源碼https://github.com/apache/stormeclipse
Apache官方版http://storm.apache.org/ Storm-1.2.2maven
徹底分佈式安裝http://www.javashuo.com/article/p-exvxutxp-bc.html分佈式
基礎入門https://blog.csdn.net/caridle/article/details/76566030ide
strom例子https://blog.csdn.net/caridle/article/details/76566030測試
storm官方文檔http://ifeve.com/storm-building-storm-with-maven/
數據庫實驗室文檔http://dblab.xmu.edu.cn/blog/build-storm-starter-with-maven/
推薦使用maven項目進行storm開發
3.安裝本地storm 在安裝本地 Storm 以前下載一個 Storm 安裝程序並將其解壓到你的電腦的某個位置。而後將 Storm 的 bin/ 目錄添加到 PATH 環境變量中,確保 bin/storm 腳本能夠直接運行。
本地機器上安裝的 Storm 僅能用於與遠程集羣的交互 本地模式下的開發、測試拓撲,推薦使用 Maven 來將 Storm 添加到項目的開發依賴中。 在項目的 pom.xml 中添加如下依賴來將 Storm 包含進項目中 org.apache.storm storm-core 1.2.2 provided <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>1.2.2</version> <scope>provided</scope> </dependency>
Maven配置https://github.com/apache/storm/blob/master/examples/storm-starter/pom.xml
4.本地安裝maven
下載最新版maven,將bin目錄加入path中,使用mvn –v驗證。使用命令mvn help:system下載相關。在eclipse/windows/preference/maven中選installtion更改成下載的版本,在user setting中選下載的maven的conf/setting。
在conf\setting.xml文件中修改鏡像。更改localrepository爲指定目錄。
Oschina的關了,阿里雲的可用。
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
在</profiles>標籤中加這個
<repositories>
<repository>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</repository>
</repositories>
新建maven項目便可使用。
5.安裝zookeeper
安裝storm前須要安裝zookeeper。
在storm.Yaml文件中配置好就能和遠程集羣通訊。