- Mastering Apache Storm
- Ankit Jain
- 294字
- 2021-07-02 20:32:29
Setting up the Storm cluster
In this chapter, we will learn how to set up a three nodes Storm cluster, of which one node will be the active master node (Nimbus) and the other two will be worker nodes (supervisors).
The following is the deployment diagram of our three node Storm cluster:

The following are the steps that need to be performed to set up a three node Storm cluster:
- Install and run the ZooKeeper cluster. The steps for installing ZooKeeper are mentioned in the previous section.
- Download the latest stable Storm release from https://storm.apache.org/downloads.html; at the time of writing, the latest version is Storm 1.0.2.
- Once you have downloaded the latest version, copy and unzip it in all three machines. Now, we will set the $STORM_HOME environment variable on each machine to make the setup easier. The $STORM_HOME environment contains the path of the Storm home folder (for example, export STORM_HOME=/home/user/storm-1.0.2).
- Go to the $STORM_HOME/conf directory in the master nodes and add the following lines to the storm.yaml file:
storm.zookeeper.servers: - "zoo1" - "zoo2" - "zoo3" storm.zookeeper.port: 2181 nimbus.seeds: "nimbus1,nimbus2" storm.local.dir: "/tmp/storm-data"
We are installing two master nodes.
- Go to the $STORM_HOME/conf directory at each worker node and add the following lines to the storm.yaml file:
storm.zookeeper.servers: - "zoo1" - "zoo2" - "zoo3" storm.zookeeper.port: 2181 nimbus.seeds: "nimbus1,nimbus2" storm.local.dir: "/tmp/storm-data" supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703
If you are planning to execute the Nimbus and supervisor on the same machine, then add the supervisor.slots.ports property to the Nimbus machine too.
- Go to the $STORM_HOME directory at the master nodes and execute the following command to start the master daemon:
$> bin/storm nimbus &
- Go to the $STORM_HOME directory at each worker node (or supervisor node) and execute the following command to start the worker daemons:
$> bin/storm supervisor &
推薦閱讀
- 算法零基礎一本通(Python版)
- JavaScript:Functional Programming for JavaScript Developers
- PHP 7底層設計與源碼實現
- Visual C++實例精通
- Scratch 3游戲與人工智能編程完全自學教程
- FFmpeg入門詳解:音視頻原理及應用
- Python機器學習經典實例
- C語言程序設計同步訓練與上機指導(第三版)
- Java零基礎實戰
- C++從入門到精通(第6版)
- SignalR:Real-time Application Development(Second Edition)
- Application Development with Parse using iOS SDK
- Application Development with Swift
- Java程序設計入門(第2版)
- Learning ROS for Robotics Programming