You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kevin <ke...@leonardo.com> on 2015/10/27 21:19:28 UTC

Queue stats

Hi,

Are there some examples/documentation on how to get stats for caches in
Java? (via Visor presumably?)

As far as I can tell, queues are also caches in Ignite. Is it possible to
get the same stats for queues that are available for caches somehow?

Thanks
Kevin



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Queue stats

Posted by vkulichenko <va...@gmail.com>.
Kevin,

Note that the way suggested by Denis will work if there is one data
structure (queue, set, atomic long, etc.). If there are several of them,
they will have names like datastructures_0, datastructures_1,
datastructures_2, etc., so you will probably not know which cache is used
for which data structure.

I created a ticket to support metrics for data structures [1]. You're
welcome to pick it up and fix :)

[1] https://issues.apache.org/jira/browse/IGNITE-1813

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727p1770.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Queue stats

Posted by Denis Magda <dm...@gridgain.com>.
Dmitriy, Kevin,

IgniteQueue implementation is stored in a system cache that is 
unavailable through public API.

Sure, you can get a reference to metrics using a private API [1], 
however as I see from the sources there is no sense to do this because 
this system cache is shared among other data structures.

Igniters, correct me if I'm wrong.

--
Denis

[1]

((IgniteKernal)ignite).internalCache("datastructures_0").metrics();



On 10/29/2015 4:20 PM, kevin wrote:
> Hi Dmitriy,
>
> That was what I'm not sure of. How do I get the cache stats for a queue?
> Since I only have the IgniteQueue interface, I don't see any methods on it
> that could help me with this.
>
> Thanks
> Kevin
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727p1763.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Queue stats

Posted by kevin <ke...@leonardo.com>.
Hi Dmitriy,

That was what I'm not sure of. How do I get the cache stats for a queue?
Since I only have the IgniteQueue interface, I don't see any methods on it
that could help me with this.

Thanks
Kevin



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727p1763.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Queue stats

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Wed, Oct 28, 2015 at 2:55 PM, kevin <ke...@leonardo.com> wrote:

> kevin wrote
> > Hi,
> >
> > Are there some examples/documentation on how to get stats for caches in
> > Java? (via Visor presumably?)
> >
> > As far as I can tell, queues are also caches in Ignite. Is it possible to
> > get the same stats for queues that are available for caches somehow?
> >
> > Thanks
> > Kevin
>
> I'll answer my first question: found the method IgniteCache.metrics():
>
> http://ignite.apache.org/releases/1.4.0/javadoc/org/apache/ignite/IgniteCache.html#metrics()
> That'll give a CacheMetrics object that contains all the stats Ignite has.
>
> Would still like any answer to the second question regarding queue stats.
> Thanks.
>

There are no specific stats for queues, but since queue is based on a
cache, wouldn’t you be able to re-use cache metrics for it? Seems like
there is enough data there to extrapolate any information.


>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727p1753.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Queue stats

Posted by kevin <ke...@leonardo.com>.
kevin wrote
> Hi,
> 
> Are there some examples/documentation on how to get stats for caches in
> Java? (via Visor presumably?)
> 
> As far as I can tell, queues are also caches in Ignite. Is it possible to
> get the same stats for queues that are available for caches somehow?
> 
> Thanks
> Kevin

I'll answer my first question: found the method IgniteCache.metrics():
http://ignite.apache.org/releases/1.4.0/javadoc/org/apache/ignite/IgniteCache.html#metrics()
That'll give a CacheMetrics object that contains all the stats Ignite has.

Would still like any answer to the second question regarding queue stats.
Thanks.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Queue-stats-tp1727p1753.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.