You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Andrew Neilson (JIRA)" <ji...@apache.org> on 2014/03/25 05:00:44 UTC

[jira] [Comment Edited] (STORM-197) registering metrics in an IRichSpout used in Trident Topology throws an Exception

    [ https://issues.apache.org/jira/browse/STORM-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924935#comment-13924935 ] 

Andrew Neilson edited comment on STORM-197 at 3/25/14 3:58 AM:
---------------------------------------------------------------

This issue becomes more visible when using Trident with the 0.5.0-SNAPSHOT version of [storm-kafka-0.8-plus|https://github.com/wurstmeister/storm-kafka-0.8-plus]. It seems to work fine from the 0.3.0 release but otherwise the workaround is to build a version of storm-kafka with all calls to registerMetric commented out or removed.


was (Author: andrewneilson):
This issue becomes more visible when using Trident with [storm-kafka-0.8-plus|https://github.com/wurstmeister/storm-kafka-0.8-plus]. The workaround is to build a version of storm-kafka with all calls to registerMetric commented out or removed.

> registering metrics in an IRichSpout used in Trident Topology throws an Exception
> ---------------------------------------------------------------------------------
>
>                 Key: STORM-197
>                 URL: https://issues.apache.org/jira/browse/STORM-197
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>            Reporter: Jason Trost
>              Labels: Metrics
>
> Because of how the RichSpoutBatchExecutor initializes and calls open() of the IRichSpout, any metric registrations cause an exception to be thrown.  See stacktrace below.
> java.lang.RuntimeException: java.lang.RuntimeException: TopologyContext.registerMetric can only be called from within overridden IBolt::prepare() or ISpout::open() method.
>     at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:90)
>     at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:61)
>     at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:62)
>     at backtype.storm.daemon.executor$fn__3498$fn__3510$fn__3557.invoke(executor.clj:730)
>     at backtype.storm.util$async_loop$fn__444.invoke(util.clj:403)
>     at clojure.lang.AFn.run(AFn.java:24)
>     at java.lang.Thread.run(Thread.java:722)
> Caused by: java.lang.RuntimeException: TopologyContext.registerMetric can only be called from within overridden IBolt::prepare() or ISpout::open() method.
>     at backtype.storm.task.TopologyContext.registerMetric(TopologyContext.java:213)
>     at com.XXXXXXX.spouts.amqp.AMQPSpout.open(AMQPSpout.java:232)
>     at storm.trident.spout.$RichSpoutEmitter.emitBatch(RichSpoutBatchExecutor.java:88)
>     at storm.trident.spout.TridentSpoutExecutor.execute(TridentSpoutExecutor.java:65)
>     at storm.trident.topology.TridentBoltExecutor.execute(TridentBoltExecutor.java:352)
>     at backtype.storm.daemon.executor$fn__3498$tuple_action_fn__3500.invoke(executor.clj:615)
>     at backtype.storm.daemon.executor$mk_task_receiver$fn__3421.invoke(executor.clj:383)
>     at backtype.storm.disruptor$clojure_handler$reify__2962.onEvent(disruptor.clj:43)
>     at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:87)
>     ... 6 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)