Storm Command Syntax

The storm command lets you perform various actions on a Storm topology. Each command option is explained below.

Parameter Description

activate

Activates the specified topology's spouts.

classpath

Prints the classpath used by the storm client when running commands.

deactivate

Deactivates the specified topology’s spouts.

drpc

Launches a DRPC daemon. This command should be run under supervision with a tool like daemontools or monit.

DRPC is bundled with Storm. The DRPC server coordinates receiving an RPC request, sending the request to the Storm topology, receiving the results from the Storm topology, and sending the results back to the waiting client.

The Storm topology takes a stream of function arguments as its input, and emits an output stream of the results for each of those function calls.

help

Displays help information for the storm command.

jar <topology-jar-path class>

Runs the main method of class with the specified arguments. The storm JARs and configurations in /opt/mapr/storm/storm-<version> are put on the classpath. The process is configured so that StormSubmitter will upload the JAR at topology-jar-path when the topology is submitted.

kill <topology-name> [-w wait-time-secs]

Kills the topology with the name topology-name. Storm will first deactivate the topology’s spouts for the duration of the topology’s message timeout to allow all messages currently being processed to finish processing. Storm will then shut down the workers and clean up their state. You can override the length of time Storm waits between deactivation and shutdown with the -w option.

list

Lists the names of the running topologies and their statuses.

localconfvalue

Prints out the value for conf-name in the local Storm configuration settings. The local Storm configuration settings are the ones in /opt/mapr/storm/storm-<version>/storm.yaml merged with the configuration settings in defaults.yaml.

logviewer

Launches the log viewer daemon. It provides a web interface for viewing Storm log files. This command should be run under supervision with a tool like daemontools or monit.

monitor <topology-name> [-i <interval-secs>] [-m <component-id>] [-s <stream-id>] [-w [emitted | transferred]]

Monitors the specified topology's throughput interactively. Indicate which data you want to monitor by specifying interval-secs, component-id, stream-id, or watch-item (emitted or transferred).

Default settings for each option are:

  • interval-secs (the polling interval in seconds) = 4

  • component-id = list

  • stream-id = default

  • watch-item = emitted

nimbus

Launches the nimbus daemon. This command should be run under supervision with a tool like daemontools or monit.

rebalance <topology-name> [-w wait-time-secs] [-n new-num-workers] [-e component=parallelism]

Redistributes the workers evenly around the cluster. This option can also be used to change the parallelism of a running topology.

The -w option overrides the wait time. Use the -n and -e options to change the number of workers or number of executors of a component respectively.

remoteconfvalue

Prints out the value for conf-name in the cluster's Storm configurations. The cluster's Storm configurations are the ones in /opt/mapr/storm/storm-<version>/storm.yaml merged with the configurations in defaults.yaml.

WARNING:

This command must be run on a cluster machine.

repl

Opens a Clojure REPL with the storm JARs and configuration on the classpath. Useful for debugging.

shell

Constructs a JAR file and uploads it to Nimbus, then calls the program with the <host:port> of Nimbus and the jarfile id.

supervisor

Launches the supervisor daemon. This command should be run under supervision with a tool like daemontools or monit.

ui

Launches the UI daemon. The UI provides a web interface for a Storm cluster and shows detailed statistics about running topologies. This command should be run under supervision with a tool like daemontools or monit.

version

Prints the version number of the Storm release.