incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <mmo...@apache.org>
Subject Re: About using Metrics
Date Wed, 29 May 2013 15:42:52 GMT

On May 29, 2013, at 08:54 , Sky Zhao wrote:

> Thanks Matthieu,
>  
> About Metrics library
> If use this, in s4 whether application class code should add Gauge code, but if tracing
PE instances(queue size, or time consuming), how inject Gauge into PE element, seems a bit
complex and messy to write Gauge code.

If you have issues with the metrics library, I'd recommend to ask for help on the metrics
user list.

>  
>  
> About S4Metrics
> S4Metrics is a good class which can trace the stream queue size or time etc.
> But don’t know how to use it in S4 application, can you instruct link to describe,
another, s4.metrics.config I can not find, which specify the content format, does it have
other functions and how to use it.

just pass s4.metrics.config as a "-p" parameter when deploying the app. For instance:

./s4 deploy -s4r=http://$LOCALHOST:8080/test-apps/twitter-counter/build/libs/counterArchive.s4r
-c=cluster1 -appName=twitter-counter -p=s4.metrics.config=console:10:SECONDS

The format for s4.metrics.config is explained here: http://incubator.apache.org/s4/doc/0.6.0/metrics/


Hope this helps,

Matthieu

>  
> From: Matthieu Morel [mailto:mmorel@apache.org] 
> Sent: Tuesday, May 28, 2013 6:49 PM
> To: s4-user@incubator.apache.org
> Subject: Re: About using Metrics
>  
> Not sure I understand the question. We use an external library for adding metrics to
various parts of the platform. But you have to define explicitly what you measure, by inserting
the corresponding metrics hooks.
>  
> In S4 we tried to factor metrics management in an S4Metrics class, but that is mostly
for clarity.
>  
> See the library documentation here http://metrics.codahale.com/ for more info on how
to use the same library, though there are others.
>  
> Hope this helps,
>  
> Matthieu
>  
>  
> On May 28, 2013, at 12:19 , Sky Zhao wrote:
> 
> 
> If using Metrics in project, not affect source code, I am ready to use inject event into
s4, how to do it,
> Can you give some examples,but the Metrics links is still not clear.
>  
> Thanks first
>  
> /Sky


Mime
View raw message