Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Storm Appendix B


May 17, 2021 Storm getting Started


Table of contents


Appendix B

Install the Storm cluster

The contents of this appendix are a bit old. The latest Storm no longer has to rely on ZeroMQ, and libraries and software that depend on it are already updated.

There are two ways to create a Storm cluster:

  • Use Storm Deployment to create a cluster on Amazon EC2, as you can see in Chapter 6.
  • Manual installation (see appendix)

To install Storm manually, you need to install the following software first

  • Zookeeper cluster (see Management Wizard for details on how to install it)
  • Java6.0
  • Python2.6.6
  • Unzip command

NOTE: Nimbus and management processes will rely on Java, Python, and unzip commands

Install the local library:

Install ZeroMQ:

wget http://download.zeromq.org/historic/zeromq-2.1.7.tar.gz
tar -xzf zeromq-2.1.7.tar.gz
cd zeromq-2.1.7
./configure
make
sudo make install

Install JZMQ:

     git clone https://github.com/nathanmarz/jzmq.git
     cd jzmq
     ./autogen.sh
     ./configure
     make
     sudo make install

The local library is installed and the latest Storm Stabilization edition (Storm 0.7.1 is the time to write this book). T ranslation of this chapter is v0.9.1, available for download from http://storm.incubator.apache.org/ https://github.com/apache/incubator-storm/releases or https://github.com/apache/incubator-storm/releases) and unzipped.

Edit the configuration file to increase the Storm cluster configuration (all default configurations can be seen from the defaults.yaml of the Storm repository).

Edit the conf/storm.yaml in the Storm directory, add the following parameters, and increase the cluster configuration:

storm.zookeeper.servers:  
– "zookeeper addres 1"  
– "zookeeper addres 2"  
– "zookeeper addres N"  
storm.local.dir: "a local directory"  
nimbus.host: "Nimbus host addres"  
supervisor.slots.ports:  
– supervisor slot port 1  
– supervisor slot port 2  
– supervisor slot port N  

Parameter interpretation:

storm.zookeeper.servers

Your zookeyer server address.

storm.local.dir:

Storm 进程保存内部数据的本地目录。(务必保证运行 Storm 进程的用户拥有这个目录的写权限。)  

nimbus.host

Nimbus运行的机器的地址  

supervisor.slots.ports

接收消息的工人进程监听的端口号(通常从6700开始);管理进程为这个属性指定的每个端口号运行一个工人进程。

When you're done with these configurations, you're ready to run all the Storm processes. If you want to run a local process test, configure nimbus.host as localhost.

Start a Storm process that executes in the Storm directory: ./bin/storm process name.

NOTE: Storm provides an excellent tool called Storm UI to assist in monitoring the topology.