A Clojure library designed to help you better understand your Storm topology visualizing it. At this moment the only one visualization way is supported - graphviz.
[org.clojars.hsestupin/storm-spirit "0.1.0"]
<dependency>
<groupId>org.clojars.hsestupin</groupId>
<artifactId>storm-spirit</artifactId>
<version>0.1.0</version>
</dependency>
Use of this project requires that Graphviz is installed, which can be checked by running dot -V
at the command line. If it's not installed, you can do the following:
platform | directions |
---|---|
Linux | install graphviz using your package manager |
OS X | download the installer |
Windows | download the installer |
Lets assume that var topology
holds your topology built something like that. You can build the view of topology like this:
; using wrapper
(storm-spirit.core/visualize-with-graphviz topology)
; or multimethod call
(storm-spirit.core/visualize {:view-format :graphviz :topology topology})
And you will see:
Also by default it draws vertical graph but you could specify the direction like this (see possible parameter values http://www.graphviz.org/content/attrs#drankdir):
; using wrapper
(storm-spirit.core/visualize-with-graphviz topology {:graph-attrs {:rankdir :LR}})
; or multimethod call
(storm-spirit.core/visualize {:view-format :graphviz :topology topology
:graph-attrs {:rankdir :LR}})
Which produces the following image:
Please notice that any graph attributes specified in the map :graph-attrs
are simply passed to dot.
Copyright (C) 2014 Sergey Stupin
Distributed under the Eclipse Public License, the same as Clojure.