Thank you very much for responding.

Yes, I am concerned whenever a call must be made to remote machines,
particularly when used by my monitoring framework -- because without that
data I am relatively blind.
And that call (for all metrics) must be very fast and not affect
performance.

Yesterday, I did an experiment using  

            gauges.put("ignite.current.cache." + cacheName + ".size",
(Gauge<Integer>) () -> (ignite.cache(cacheName).localMetrics().getSize()));

And this works (but is not great)
In the metrics framework, I must; 1) sum the size across all of the Nodes,
2) then divide by the number of copies (primary + backups)
And I have found that this is not always exactly the same number as what I
see from `cache.size(CachePeekMode.PRIMARY)` 

Is there any way that I can ask if a given Node contains a piece of the
Primary or the Backups for a given Cache?

I will consider using your async strategy above.

But what I really want is a local Node to know if it is a part of the
Primary or Backup, and simply report its size.

So I could do this:

         CacheMetric cm = ignite.cache(cacheName).localMetrics();
         return ((cm.isPrimary()) ? cm.size() : 0); 

Or perhaps, have every Node know the size of the Primary at any given time?
Maybe this could simply be a part of the heartbeats that are already sent
around today?

Thanks, 
-- Chris 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to