Creating a new Storm project
This page outlines how to set up a Storm project for development. The steps are:
- Add Storm jars to classpath
- If using multilang, add multilang dir to classpath
Follow along to see how to set up the storm-starter project in Eclipse.
Add Storm jars to classpath
You'll need the Storm jars on your classpath to develop Storm topologies. Using Maven is highly recommended. Here's an example of how to setup your pom.xml for a Storm project. If you don't want to use Maven, you can include the jars from the Storm release on your classpath.
storm-starter uses Leiningen for build and dependency resolution. You can install leiningen by downloading this script, placing it on your path, and making it executable. To retrieve the dependencies for Storm, simply run lein deps
To set up the classpath in Eclipse, create a new Java project, include src/jvm/
as a source path, and make sure all the jars in lib/
andlib/dev/
are in the Referenced Libraries
If using multilang, add multilang dir to classpath
If you implement spouts or bolts in languages other than Java, then those implementations should be under the multilang/resources/
directory of the project. For Storm to find these files in local mode, the resources/
dir needs to be on the classpath. You can do this in Eclipse by adding multilang/
For more information on writing topologies in other languages, see Using non-JVM languages with Storm.
To test that everything is working in Eclipse, you should now be able to Run
the WordCountTopology.java
come from storm wiki
标签:Creating,Eclipse,project,Storm,new,jars,your,multilang From: https://blog.51cto.com/u_2650279/6154703