Databases Reference
In-Depth Information
Checking Java Installation
The first step to set up the environment is to check which version of Java you are
running. Open a terminal window and run the command java -version . We should
see something similar to the following:
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
If not, check your Java installation. ( See http://www.java.com/download/ . )
Creating the Project
To start the project, create a folder in which to place the application (as you would for
any Java application). This folder will contain the project source code.
Next we need to download the Storm dependencies: a set of jars that we'll add to the
application classpath. You can do so in one of two ways:
• Download the dependencies, unpack them, and add them to the classpath
• Use Apache Maven
Maven is a software project management and comprehension tool. It
can be used to manage several aspects of a project development cycle,
from dependencies to the release build process. In this topic we'll use it
extensively. To check if maven is installed, run the command mvn . If not
you can download it from http://maven.apache.org/download.html .
Although is not necessary to be a Maven expert to use Storm, it's helpful
to know the basics of how Maven works. You can find more information
on the Apache Maven website ( http://maven.apache.org/ ).
To define the project structure, we need to create a pom.xml (project object model) file,
which describes dependencies, packaging, source code, and so on. We'll use the de-
pendencies and Maven repository set up by nathanmarz ( https://github.com/nathan
marz/ ). These dependencies can be found at https://github.com/nathanmarz/storm/wiki/
Maven .
The Storm Maven dependencies reference all the libraries required to
run Storm in Local Mode.
Search WWH ::




Custom Search