Installing storm client
To submit Topology on production mode we need a storm client.
To install the storm-client on a machine follows the following steps -
1. Download storm release (in my case storm-0.8.2) from the following link-
https://github.com/nathanmarz/storm
Note: Skip steps 2,3 and 4, if you have already installed storm client-
2. Extract the downloaded storm release using the following command
$ tar -xvzf ~/Downloads/storm-0.8.2/ -C /usr/local
3. Set the path of bin directory of storm relase to access the storm command from anywhere, without typing the full path.
4. Create a local , storm configuration, where we will tell about our nimbus host. To do it follow these steps-
Creation of jar file containig your code and all the dependencies of your code
1. Type following command for compiling your code using maven. First change your current directory to your project base directory.
$ mvn -f pom.xml compile
3. create a jar containing you code
$ mvn -e package
// this command create jar file of your project under target directory of your project
Submitting jar file to your storm cluster
To submit Topology on production mode we need a storm client.
To install the storm-client on a machine follows the following steps -
1. Download storm release (in my case storm-0.8.2) from the following link-
https://github.com/nathanmarz/storm
Note: Skip steps 2,3 and 4, if you have already installed storm client-
2. Extract the downloaded storm release using the following command
$ tar -xvzf ~/Downloads/storm-0.8.2/ -C /usr/local
3. Set the path of bin directory of storm relase to access the storm command from anywhere, without typing the full path.
4. Create a local , storm configuration, where we will tell about our nimbus host. To do it follow these steps-
$ mkdir -p ~/.storm
$ cat > storm.yaml
$ nimbus.host: "192.168.1.99" // ip of your nimbus host
Creation of jar file containig your code and all the dependencies of your code
1. Type following command for compiling your code using maven. First change your current directory to your project base directory.
$ mvn -f pom.xml compile
3. create a jar containing you code
$ mvn -e package
// this command create jar file of your project under target directory of your project
Submitting jar file to your storm cluster
To submit the jar of your code(toplogy) in cluster type the following command -
$ storm jar full-path-of-you-jar name-of-your-main- class arguments
No comments:
Post a Comment