Storm document (5)----Create a new storm project

Source: Internet
Author: User

Source Address: http://storm.apache.org/documentation/Creating-a-new-Storm-project.html

This article mainly describes how to configure a storm project for development. The steps are as follows:

1. Add storm jar package to Classpath

2. If you use multi-lingual features, add the multilingual implementation directory to Classpath

Here's a look at how to configure the Storm-starter project in the eclipse environment.

Add storm jars Package to Classpath

You need to add the storm jars package to your classpath in order to develop storm topologies. It is highly recommended to use MAVEN. Here is an example of how to configure a Pom.xml file for a storm project. If you do not want to use MAVEN, you can include the jars package in the Storm release version in Classpath.

The Storm-starter project uses Leiningen as a build and dependent solution. You can install Leiningen from this script and put it under your path so that it is executable. If you need to get all the storm dependency packages, simply use the command line Lein Deps under the project root.

To configure Classpath in Eclipse, create a new Java project with SRC/JVM as the source code path, and ensure that all jars packages in lib/and Lib/dev are in the referenced libraries of the project.

If you use multi-lingual features, you need to add the Multilang directory to Classpath

If you implement spouts or bolts using a language other than Java, these implementations should be placed in the Multilang/resources directory. For storm to find these files in local mode, the resource/directory needs to be in classpath. In eclipse you can use Mulitlang as the source file directory and multilang/resources to the source file directory.

For more information about implementing topologies in other languages, you can view USINGNON-JVM language with Storm.

If you want to test whether all the configurations in eclipse are working, you can run the Wordcounttopology.java file and you will see it emit 10 seconds of message.

Storm document (5)----Create a new storm project

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.