storm-0.9.3 wordcount例子运行步骤(单机版)

来源:互联网 发布:知豆新能源汽车 编辑:程序博客网 时间:2024/04/27 23:25

网上关于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的主类提交给nimbus2,    解压: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.WordCountTopology5,将编译后的jar复制到storm的bin目录:storm-starter-0.9.3-jar-with-dependencies.jar6,执行: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来进行编译了。。。。


参考:http://blog.sina.com.cn/s/blog_772f8d010100zm4d.html

http://www.jdon.com/bigdata/stormwin.html

http://blog.csdn.net/joeyon1985

1 0
原创粉丝点击