Storm Streaming Server comes in compressed zip/tar file. Please unzip the container into a desired location (we suggest something withing /home or /srv directories). The package contains:
StormStreamingServer.jar | Main server file (jar library) |
config/log4j.xml | XML containing log4j configuration |
config/preferences.xml | XML containing server configuration |
log/log.log | Initial log file (empty) |
license/storm-license.key | License key (it’ll be updated by the server itself) |
license/storm-pubic.key | Public license key |
scripts/start.sh | Start script |
scripts/stop.sh | Stop script |
In order to start the server you can edit scripts/start.sh script. It’s very short and simple:
#!/bin/sh
pkill -9 -f "StormStreamingServer.jar"
echo Shutting down old instances ... 3
sleep 1
echo Shutting down old instances ... 2
sleep 1
echo Shutting down old instances ... 1
sleep 1
pkill -9 -f "StormStreamingServer.jar"
echo Shutting down old instances ... 0
sleep 1
echo Staring new Java App
java -server -Xmx128g -Xms32g -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -jar "/home/storm/StormStreamingServer.jar" -configRootDIR /home/storm &
The script will automatically kill all instances of Storm sever and start a new one. We’ll have to edit some parameters before we can properly launch the server.
Parameter | Description |
---|---|
-Xmx128g | JVM parameter controlling maximum amount of RAM memory can be allocated to JVM. The amount shouldn’t exceed ¾ of total amount of Ram on your system. You can replace memory value with any number according to this pattern: -XmxYZ, where Y is the number of Z (g – gigabytes, m -megabytes) |
-Xms32g | JVM parameter controlling minimal amount of RAM memory allocated to the JVM. This number shouldn’t be lower than ¼ of -Xmx parameter |
-jar “<PATH_TO_JAR_FILE>” | This is a direct path to the jar file |
-configRootDIR <PATH_TO_MAIN_FOLDER> | This parameter points to the main folder of the server (containing license and config folders) |
& | This option will keep server running in the background |
Scripting is almost identical to the Linux based, but instead of Bash we have to CMD. Application will run as long as the CMD Window is opened
java -Xmx128g -Xms32g -jar C:\Program Files\Storm\StormStreamingServer.jar -configRootDIR C:\Program Files\Storm
The last thing that needs to be done is defining log files directory. In order to do it, please edit log4j.xml file and search for appender name="file" tag.
One of the parameters will show the directory for the logs.
<param name="file" value="H:/StormServer/log/log.log" />