storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stig Rohde Døssing <stigdoess...@gmail.com>
Subject Re: Need help with custom Storm Trident Metrics
Date Thu, 04 Apr 2019 07:02:33 GMT
There might be an issue with the API for StateFactory here. You need a
TopologyContext to use the new metrics API, but makeState doesn't take one.
Others can correct me if this is not an issue, but IMO feel free to
register an issue at https://issues.apache.org/jira.

Den tor. 4. apr. 2019 kl. 08.58 skrev Stig Rohde Døssing <
stigdoessing@gmail.com>:

> As far as I can tell, the JMX reporting is only hooked up to the metrics
> v2 API. You're using metrics v1. Could you try to register your metric with
> the new metrics system? You can find documentation at
> https://storm.apache.org/releases/2.0.0-SNAPSHOT/metrics_v2.html.
>
> Den ons. 3. apr. 2019 kl. 15.41 skrev Niraj Gupta <nirajk42@gmail.com>:
>
>> *Storm version*: 1.0.3 I'm registering custom metric in the makeState of
>> the StateFactory implementation.
>>
>> @Overridepublic State makeState(final Map conf, final IMetricsContext metricsContext,
final int partitionIndex, final int numPartitions) {
>>     ReducedMetric reducedMetric = new ReducedMetric(new MeanReducer());
>>     metricsContext.registerMetric("custom-metric-1", reducedMetric, 1);
>>     reducedMetric.update(100);}
>>
>> I have added the following jmx config in the storm.yml
>>
>> -Dcom.sun.management.jmxremote.port=3337 -Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
>>
>> After running the Storm cluster when I'm connecting to the 3337 port then
>> I'm not seeing this metrics which I had defined.
>>
>> What am I missing?
>>
>> --
>> Regards,
>> Niraj Gupta
>> +91 727533898
>> 0
>>
>>
>> --
>> Regards,
>> Niraj Gupta
>> +91 7275338980
>>
>>
>> --
>> Regards,
>> Niraj Gupta
>> +91 7275338980
>>
>

Mime
View raw message