1. Download and unzip
2. Edit Conf/storm.yaml
12345678910111213141516 |
storm.zookeeper.servers: -"vm1" # -"Server2" # storm.zookeeper.port:2181 storm.local.dir: "/usr/local/bigdata/tmp/storm_ TMP " nimbus.host:" vm1 " Supervisor.slots.ports:      -6700      -6701      -6702      -6703 |
Storm.zookeeper.servers: Configuring the ZK cluster without ports
Storm.zookeeper.port: Configure the port of the ZK cluster, default is 2181
Storm.local.dir: Configure a local directory of storm for storing files such as jars, Conf, and so on.
Nimbus.host: Configuring Nimbus for Storm Clusters (master node)
Supervisor.slots.ports: Configure the port of the Storm cluster's supervisor (slave node), configure several ports to have several slots (slots), default is 6700, 6701, 6702, 6703 4 ports
Copy the Storm folder to the other machines on the storm cluster.
1 |
rsync -a storm [email protected]: /usr/local/bigdata/ |
3. Start the main node Nimbus
To execute a command on the primary node:
Or
1 |
storm nimbus > /dev/null & |
4. Start from node supervisor
Execute the command from the node (it can actually be started on the master node):
1 |
storm supervisor >/dev/ null & |
5. Start the Storm UI
Port default is 8080, Access address: http://vm1:8080/
You can view the status of the cluster, topology, or execute some commands on the UI interface.
6. Submit Topology
1 |
storm jar xx.jar aa.bb.WordcountTopology |
7. Kill topology
1 |
storm kill wordcount -w 30 |
8. Start Logviewer
All nodes on the storm cluster are executed:
1 |
storm logviewer >/dev/ null & |
Storm Cluster Setup