You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Nathan Leung <nc...@gmail.com> on 2014/05/14 17:38:39 UTC

Spout sleep wait strategy question

Hi,

I am configuring spout sleep in my topology by adding the following items
to my configuration map but it does not appear to affect the behavior of
the spout:

        config.put("topology.spout.wait.strategy",
"backtype.storm.spout.SleepSpoutWaitStrategy");
        config.put("topology.sleep.spout.wait.strategy.time.ms", 1000);

I realize the first line should not be necessary but I wanted to be
explicit.  My spout has 1 task and is reading from a kafka topic (not kafka
spout, homebrewed implementation).  If there is nothing in kafka it will
not call emit() in the nextTuple() method.  Regardless of the value used in
the second line (1, 10, 1000), when I start the topology I see that the
spout is checking kafka in a tight loop (kafka server log indicates that it
is returning 0 result many times per ms).  Am I missing something?  Right
now I am running with 0.9.1-incubating.

Thanks,
Nathan