storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Yegorov <andrey.yego...@gmail.com>
Subject Re: Properties as registerMetricsConsumer argument
Date Wed, 02 Apr 2014 06:04:20 GMT
I am using storm 0.9.1-incubating.

----------
Andrey Yegorov


On Mon, Mar 31, 2014 at 10:10 PM, Samit Sasan <sasansamit@gmail.com> wrote:

> I too am passing an arg to metrics consumer while registering but m not
> facing this problem. ... what version of storm are you using.
>
> -Samit
>
>
> On Sat, Mar 29, 2014 at 3:37 AM, Andrey Yegorov <andrey.yegorov@gmail.com>wrote:
>
>>
>> I am not sure if it is by design or just unnoticed problem, or my mistake
>> somewhere but I am getting following behavior:
>>
>> I pass Properties object as a parameter while registering my custom
>> metrics consumer:
>> conf.registerMetricsConsumer(SomeMetricsConsumer.class, new Properties(),
>> 1);
>>
>> and there I get a class cast exception:
>>
>>    public void prepare(Map stormConf, Object registrationArgument,
>> TopologyContext context, IErrorReporter errorReporter) {
>>
>>        Properties props = (Properties) registrationArgument;
>> }
>>
>> The type that I am getting is now clojure.lang.PersistentHashMap.
>>
>> I have a workaround, just want to share in case someone else runs into he
>> same problem.
>>
>> ----------
>> Andrey Yegorov
>>
>
>

Mime
View raw message