Storm installation on Mac

Source: Internet
Author: User
Strom installation and deployment

Local execution: Storm topology can be run locally and must be tested locally before release to ensure that the business logic of the Code itself is normal (Windows can also be executed, but due to permissions and other reasons, an error may be reported during execution, but the execution result is not affected ).


Local cluster execution: Storm's local cluster construction can only be performed on UNIX-based systems. Compared with local tests, local cluster testing can expose more problems (such as file paths, permissions), such as submitting topology to the production cluster.


Storm-related websites: Concurrent Programming Network-storm, official website
Storm books: getting started with storm

1. Install a local cluster

1.1 for Mac, see:
Http://blog.csdn.net/lazythinker/article/details/13002069


1.2 For Linux, refer to the official website:
Http://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster.html
Http://my.oschina.net/BreathL/blog/84165


1.3 The dependency required is:
#
Linux
OSX
Dependencies and remarks
1jdk6jdk6zookeeper
2python2. 6.6 and abovepython2.6.6 and abovenimbus
3zookeeperzookeeper must be renamed zoo_sample.conf under $ {zookeeper}/conf --> zoo. conf
4 No autotools, Autoconf, automake, PKG-config
Zeromq jzmq
OSX Installation Details:
Http://www.loveyqq.tk /? P = 6
Osx pkg-conf:
Http://stackoverflow.com/questions/3522248/how-do-i-compile-jzmq-for-zeromq-on-osx
5 zeromqzeromq
OSX Installation Details:
Http://www.loveyqq.tk /? P = 6
6 jzmqjzmq
OSX solution:
Http://tjun.org/blog/2012/04/how-to-build-jzmq-in-mac-os-x-lion/
Http://stackoverflow.com/questions/4478125/zeromq-java-installation-problem


1.4 Test
Start Nimbus: $ {storm_honme}/bin/storm Nimbus
Start Supervisor: $ {storm_honme}/bin/storm Supervisor
Start the UI: $ {storm_honme}/bin/storm UI
Access 127.0.0.1: 8080. Check whether Storm is started normally or use the command line to check the storm status.

2. Develop storm topology and deploy it to the Cluster

2.1 storm Hello world code
URL: https://github.com/zhwbqd/examples-ch02-getting_started


2.2 execution
MVN clean package
For this example, run the following command in the topology project directory:
Storm jar target/Topologies-0.0.1-SNAPSHOT.jar topologymain $ {project_path}/src/main/resources/words.txt
With these commands, you can publish the topology to the cluster.
If you want to stop or kill it, run:
Storm kill count-word-topology
Note: The topology name must be unique.


2.3 view execution results
Access 127.0.0.1 to check whether the corresponding topology exists.
Or Storm list
You can also view $ {strom_home}/logs/work. log to view the execution result of the worker process.

Storm installation on Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.