Storm Topologies 示例——(入门)

入门

学会使用Storm!


必备条件

首先,你需要在你的电脑上安装‘java’和‘git’并且将它们的环境变量配置到你电脑的‘PATH’中。另外,在storm-starter中存在两个例子需要用到Python和Ruby。

其次,确保你电脑上存在可用的storm-starter代码。Git/GitHub初学者初学者可能会用到下面的命令来下载最新的storm-starter代码并且更改到包含下载的代码的新目录。

$ git clone git://github.com/apache/storm.git && cd storm/examples/storm-starter

storm-starter 总览

storm-starter包含了使用Storm的各种示例。如果这是您第一次使用Storm,您可以首先查看这些Topology:

  1. ExclamationTopology: 全部使用Java编写的一个基本Topology
  2. WordCountTopology: Basic topology that makes use of multilang by
    implementing one bolt in Python
  3. ReachTopology: Example of complex DRPC on top of Storm

在您熟悉这些Topologies后,您可以查看其他的Topologiessrc/jvm/org/apache/storm/starter/ 比如 RollingTopWords来了解更高级的实现。

如果您想了解更多有关Storm的工作原理,请前往Storm project page.

猜你喜欢

转载自blog.csdn.net/wangyang163wy/article/details/75549853