Thank you Yuval and Yair, this has been extremely helpful.
I am now running in to a problem where Storm thinks that the metric has
already been registered. I think this might be because of the parrallelism
in my topology, but I'm not sure. Do you have any ideas as to why this
might be?
I'm receiving a runtimeException that says
The same metric name 'batch_size' was registered twice.

I am using an OpaqueTridentKafkaSpout and I am registering the metrics in
my filter functions.

Thanks!

On Mon, Sep 29, 2014 at 8:10 AM, Yair Weinberger <[email protected]> wrote:

> On a side note, if you try to register a metric in IRichSpout used in
> Trident topology, you will get a RunTimeException.
>
> See https://issues.apache.org/jira/browse/STORM-197
>
>
> On Mon, Sep 29, 2014 at 5:39 PM, Yuval Oren <[email protected]> wrote:
>
>> You can indeed register metrics in trident. In functions, override
>> prepare(), which gives you a TridentOperationContext. In aggregators, use
>> the IMetricsContext you get in makeState().
>> --
>> Yuval Oren
>> *N3TWORK*
>>
>> On Sep 26, 2014, at 4:21 PM, Raphael Hsieh <[email protected]> wrote:
>>
>> I've been following the tutorials here (
>> http://www.bigdata-cookbook.com/post/72320512609/storm-metrics-how-to)
>>  to create metrics in Storm.
>>
>> However I am using Trident which abstracts bolts away from the user. How
>> can I go about creating metrics in trident ?
>>
>> Thanks
>>
>> --
>> Raphael Hsieh
>>
>>
>>
>>
>


-- 
Raphael Hsieh

Reply via email to