[grid@hadoop4 ~]$ unzip master.zip [grid@hadoop4 ~]$ cd storm-yarn-master ## 修改 pom.xml,将Hadoop的版本号改成对应的版本号 [grid@hadoop4 storm-yarn-master]$ vim pom.xml <properties> <storm.version>0.9.0-wip21</storm.version> <hadoop.version>2.5.2</hadoop.version> <!--hadoop.version>2.1.0.2.0.5.0-67</hadoop.version--> </properties> ## 编译 [grid@hadoop4 storm-yarn-master]$ mvn package -DskipTests
5. storm-yarn-master/lib/storm-0.9.0-wip21.zip 解压到上层目录storm-yarn-master中
[grid@hadoop4 storm-yarn-master]$ cd lib [grid@hadoop4 lib]$ unzip storm-0.9.0-wip21.zip -d .. [grid@hadoop4 storm-yarn-master]$ ls bin CLA.pdf create-tarball.sh lib LICENSE.txt pom.xml README.md src storm-0.9.0-wip21 target
[grid@hadoop4 storm-yarn-master]$ hadoop fs -put ./lib/storm.zip /lib/storm/0.9.0-wip21 [grid@hadoop4 storm-yarn-master]$ hadoop fs -ls /lib/storm/0.9.0-wip21 Found 1 items -rw-r--r-- 2 grid supergroup 17141078 2015-05-24 19:43 /lib/storm/0.9.0-wip21/storm.zip
8. 在安装Hadoop时已经设置好了hadoop的一些环境变量,现在再增加如下环境变量
[grid@hadoop4 storm-yarn-master]$ vim ~/.bash_profile export PATH=$PATH:/home/grid/storm-yarn-master/storm-0.9.0-wip21/bin:/home/grid/storm-yarn-master/bin [grid@hadoop4 storm-yarn-master]$ source ~/.bash_profile
9. 修改 storm-yarn-master/storm-0.9.0-wip21/conf/storm.yaml 配置文件,增加zookeeper的配置
[grid@hadoop4 storm-yarn-master]$ vim storm-0.9.0-wip21/conf/storm.yaml storm.zookeeper.servers: - "hadoop4" - "hadoop5" - "hadoop6" master.initial-num-supervisors: 1 master.container.size-mb: 1024
[grid@hadoop4 storm-yarn-master]$ storm-yarn getStormConfig -appId application_1432484548277_0001 -output ~/.storm/storm.yaml [grid@hadoop4 storm-yarn-master]$ cat ~/.storm/storm.yaml | grep nimbus.host nimbus.host: 192.168.0.107
[grid@hadoop4 storm-yarn-master]$ storm jar lib/storm-starter-0.0.1-SNAPSHOT.jar storm.starter.WordCountTopology WordCountTopology -c nimbus.host=192.168.0.107