You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Andrey Yegorov <an...@gmail.com> on 2014/03/28 23:07:06 UTC

Properties as registerMetricsConsumer argument

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

Re: Properties as registerMetricsConsumer argument

Posted by Andrey Yegorov <an...@gmail.com>.
I am using storm 0.9.1-incubating.

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


On Mon, Mar 31, 2014 at 10:10 PM, Samit Sasan <sa...@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 <an...@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
>>
>
>

Re: Properties as registerMetricsConsumer argument

Posted by Samit Sasan <sa...@gmail.com>.
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 <an...@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
>