storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samit Sasan <sasansa...@gmail.com>
Subject Re: Properties as registerMetricsConsumer argument
Date Tue, 01 Apr 2014 05:10:16 GMT
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