Created
April 20, 2012 06:51
-
-
Save mstump/2426677 to your computer and use it in GitHub Desktop.
data leaves spout, but doesn't arrive at bolt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defbolt build-package-hash-bolt ["package"] | |
[tuple collector] | |
(emit-bolt! collector [(build-package-hash (:message tuple))] :anchor tuple) | |
(ack! collector tuple)) | |
(defbolt json-deser-bolt ["message"] | |
[tuple collector] | |
(try | |
(emit-bolt! collector [(json/parse-string (:message tuple))] :anchor tuple) | |
(ack! collector tuple) | |
(catch Exception e (fail! collector tuple)))) | |
(defn mk-redis-topology | |
[keyspace_name host port timeout password] | |
(topology | |
{"node-input" (spout-spec (RedisPubSubSpout. host port queue timeout password))} | |
{"json-deser" (bolt-spec {"node-input" :shuffle} | |
json-deser-bolt) | |
"build-package-hash" (bolt-spec {"json-deser" :shuffle} | |
build-package-hash-bolt) | |
"write-package-to-db" (bolt-spec {"build-package-hash" :shuffle} | |
(pkg/put-bolt keyspace_name))})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Storm UI screenshot:
http://i.imgur.com/tB1DF.png